anchor.diff:  
     if not IsWin32Platform then
     begin
  -    SetLength(Ints, Max);
  -    if GetTextExtentExPointW(DC, S, Max, Width, @Result, @Ints[0], Extent) then
  -      if Result > 0 then
  -        Extent.cx := Ints[Result - 1]
  -      else
  -        Extent.cx := 0;
  +    GetMem(Ints, Sizeof(Integer) * Max);
  +    try
  +      if GetTextExtentExPointW(DC, S, Max, Width, @Result, @Ints^, Extent) then
  +        if Result > 0 then
  +          Extent.cx := Ints^[Result]
  +        else
  +          Extent.cx := 0;
  +    finally
  +      FreeMem(Ints);
  +    end;
     end
     else {GetTextExtentExPointW not available in win98, 95}
     begin {optimize this by looking for Max to fit first -- it usually does}
  
positive.code:           bssRidge:
              begin
                if I in [0, 1] then
                  Color := Darker(C[I]) or PalRelative
                else
                  Color := Lighter(C[I]) or PalRelative;
                DrawOnePolygon(Canvas, Bnd, Color, I, Print);
              end;
            bssGroove:
              begin
                if (I in [2, 3]) then
                  Color := Darker(C[I]) or PalRelative
                else
                  Color := Lighter(C[I]) or PalRelative;
                DrawOnePolygon(Canvas, Bnd, Color, I, Print);
              end;
          end;
        end
        else if S[I] = bssDouble then
        begin
          Color := C[I] or PalRelative;
          Bnd[0] := PO[I];
          Bnd[1] := PO[(I + 1) mod 4];
          Bnd[2] := P1[(I + 1) mod 4];
          Bnd[3] := P1[I];
          DrawOnePolygon(Canvas, Bnd, Color, I, Print);
          Bnd[0] := P2[I];
          Bnd[1] := P2[(I + 1) mod 4];
          Bnd[2] := PI[(I + 1) mod 4];
          Bnd[3] := PI[I];
          DrawOnePolygon(Canvas, Bnd, Color, I, Print);
        end
        else if S[I] in [bssDashed, bssDotted] then
        begin
          if not InPath then
          begin
            lb.lbStyle := BS_SOLID;
            lb.lbColor := ThemedColor(C[I]) or PalRelative;
            lb.lbHatch := 0;
            if S[I] = bssDotted then
              PenType := PS_Dot or ps_EndCap_Round
  
negative.code:         Color := C[I] or PalRelative;
          case S[I] of
            bssSolid:
              DrawOnePolygon(Canvas, Bnd, Color, I, Print{$ifdef has_StyleElements},AStyleElements{$endif});
            bssInset:
              begin
                if I in [0, 1] then
                  Color := Darker(C[I]{$ifdef has_StyleElements},seClient in AStyleElements{$endif}) or PalRelative
                else
                  Color := Lighter(C[I]{$ifdef has_StyleElements},seClient in AStyleElements{$endif}) or PalRelative;
                DrawOnePolygon(Canvas, Bnd, Color, I, Print{$ifdef has_StyleElements},AStyleElements{$endif});
              end;
            bssOutset:
              begin
                if (I in [2, 3]) then
                  Color := Darker(C[I]{$ifdef has_StyleElements},seClient in AStyleElements{$endif}) or PalRelative
                else
                  Color := Lighter(C[I]{$ifdef has_StyleElements},seClient in AStyleElements{$endif}) or PalRelative;
                DrawOnePolygon(Canvas, Bnd, Color, I, Print{$ifdef has_StyleElements},AStyleElements{$endif});
              end;
          end;
        end
  