|
@@ -21,12 +21,10 @@ type
|
|
|
FFontEmHeightBefore: single;
|
|
|
FFontNameBefore: string;
|
|
|
FFontStyleBefore: TFontStyles;
|
|
|
- FAliasedBefore: boolean;
|
|
|
FFontBidiModeAfter: TFontBidiMode;
|
|
|
FFontEmHeightAfter: single;
|
|
|
FFontNameAfter: string;
|
|
|
FFontStyleAfter: TFontStyles;
|
|
|
- FAliasedAfter: boolean;
|
|
|
public
|
|
|
constructor Create(AStartShape: TVectorShape); override;
|
|
|
procedure ComputeDiff(AEndShape: TVectorShape); override;
|
|
@@ -80,7 +78,6 @@ type
|
|
|
|
|
|
TTextShape = class(TCustomRectShape)
|
|
|
private
|
|
|
- FAliased: boolean;
|
|
|
FAltitudePercent: single;
|
|
|
FPenPhong: boolean;
|
|
|
FPenFillIteration: integer;
|
|
@@ -112,7 +109,6 @@ type
|
|
|
{%H-}ASubBrokenIndex, {%H-}ACharIndex: integer);
|
|
|
procedure OnMoveLightPos({%H-}ASender: TObject; {%H-}APrevCoord, ANewCoord: TPointF;
|
|
|
{%H-}AShift: TShiftState);
|
|
|
- procedure SetAliased(AValue: boolean);
|
|
|
procedure SetAltitudePercent(AValue: single);
|
|
|
procedure SetPenPhong(AValue: boolean);
|
|
|
procedure SetFontBidiMode(AValue: TFontBidiMode);
|
|
@@ -207,7 +203,6 @@ type
|
|
|
property PenPhong: boolean read FPenPhong write SetPenPhong;
|
|
|
property LightPosition: TPointF read FLightPosition write SetLightPosition;
|
|
|
property AltitudePercent: single read FAltitudePercent write SetAltitudePercent;
|
|
|
- property Aliased: boolean read FAliased write SetAliased;
|
|
|
end;
|
|
|
|
|
|
function FontStyleToStr(AStyle: TFontStyles): string;
|
|
@@ -471,7 +466,6 @@ begin
|
|
|
FFontEmHeightBefore:= FFontEmHeight;
|
|
|
FFontNameBefore:= FFontName;
|
|
|
FFontStyleBefore:= FFontStyle;
|
|
|
- FAliasedBefore := FAliased;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
@@ -483,7 +477,6 @@ begin
|
|
|
FFontEmHeightAfter:= FFontEmHeight;
|
|
|
FFontNameAfter:= FFontName;
|
|
|
FFontStyleAfter:= FFontStyle;
|
|
|
- FAliasedAfter := FAliased;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
@@ -496,7 +489,6 @@ begin
|
|
|
FFontEmHeight := FFontEmHeightAfter;
|
|
|
FFontName := FFontNameAfter;
|
|
|
FFontStyle := FFontStyleAfter;
|
|
|
- FAliased := FAliasedAfter;
|
|
|
if Assigned(FTextLayout) then FTextLayout.InvalidateLayout;
|
|
|
EndUpdate;
|
|
|
end;
|
|
@@ -511,7 +503,6 @@ begin
|
|
|
FFontEmHeight := FFontEmHeightBefore;
|
|
|
FFontName := FFontNameBefore;
|
|
|
FFontStyle := FFontStyleBefore;
|
|
|
- FAliased := FAliasedBefore;
|
|
|
if Assigned(FTextLayout) then FTextLayout.InvalidateLayout;
|
|
|
EndUpdate;
|
|
|
end;
|
|
@@ -526,7 +517,6 @@ begin
|
|
|
FFontEmHeightAfter := next.FFontEmHeightAfter;
|
|
|
FFontNameAfter := next.FFontNameAfter;
|
|
|
FFontStyleAfter := next.FFontStyleAfter;
|
|
|
- FAliasedAfter := next.FAliasedAfter;
|
|
|
end;
|
|
|
|
|
|
function TTextShapeFontDiff.IsIdentity: boolean;
|
|
@@ -534,8 +524,7 @@ begin
|
|
|
result := (FFontBidiModeBefore = FFontBidiModeAfter) and
|
|
|
(FFontEmHeightBefore = FFontEmHeightAfter) and
|
|
|
(FFontNameBefore = FFontNameAfter) and
|
|
|
- (FFontStyleBefore = FFontStyleAfter) and
|
|
|
- (FAliasedBefore = FAliasedAfter);
|
|
|
+ (FFontStyleBefore = FFontStyleAfter);
|
|
|
end;
|
|
|
|
|
|
{ TTextShape }
|
|
@@ -684,15 +673,6 @@ begin
|
|
|
LightPosition := ANewCoord;
|
|
|
end;
|
|
|
|
|
|
-procedure TTextShape.SetAliased(AValue: boolean);
|
|
|
-begin
|
|
|
- if FAliased=AValue then Exit;
|
|
|
- BeginUpdate(TTextShapeFontDiff);
|
|
|
- FAliased:=AValue;
|
|
|
- InvalidateAll;
|
|
|
- EndUpdate;
|
|
|
-end;
|
|
|
-
|
|
|
procedure TTextShape.SetAltitudePercent(AValue: single);
|
|
|
begin
|
|
|
if AValue < 0 then AValue := 0;
|
|
@@ -1186,7 +1166,6 @@ begin
|
|
|
FPenFillIteration := 0;
|
|
|
FAltitudePercent:= DefaultAltitudePercent;
|
|
|
FLightPosition := PointF(0,0);
|
|
|
- FAliased := false;
|
|
|
FCurBrokenLineImageId := 0;
|
|
|
end;
|
|
|
|
|
@@ -1247,8 +1226,6 @@ begin
|
|
|
end else
|
|
|
SetDefaultFont;
|
|
|
|
|
|
- Aliased := AStorage.Bool['aliased'];
|
|
|
-
|
|
|
phongObj := AStorage.OpenObject('pen-phong');
|
|
|
PenPhong := Assigned(phongObj);
|
|
|
if PenPhong then
|
|
@@ -1299,7 +1276,6 @@ begin
|
|
|
font.RawString['bidi'] := FontBidiModeToStr(FontBidiMode);
|
|
|
font.RawString['style'] := FontStyleToStr(FontStyle);
|
|
|
font.Free;
|
|
|
- AStorage.Bool['aliased'] := Aliased;
|
|
|
|
|
|
if PenPhong then
|
|
|
begin
|
|
@@ -1340,7 +1316,7 @@ end;
|
|
|
|
|
|
class function TTextShape.Fields: TVectorShapeFields;
|
|
|
begin
|
|
|
- Result:= [vsfPenFill,vsfOutlineFill,vsfOutlineWidth];
|
|
|
+ Result:= [vsfPenFill,vsfOutlineFill,vsfOutlineWidth,vsfAliased];
|
|
|
end;
|
|
|
|
|
|
class function TTextShape.PreferPixelCentered: boolean;
|
|
@@ -1886,7 +1862,8 @@ begin
|
|
|
begin
|
|
|
tempRenderNewList := TStringList.Create;
|
|
|
useBrokenLinesRender := not ADraft and (Usermode = vsuEditText);
|
|
|
- if not tempStorage.AffineMatrixEquals('last-matrix', AMatrix) or
|
|
|
+ if (tempStorage.Bool['aliased'] <> Aliased) or
|
|
|
+ not tempStorage.AffineMatrixEquals('last-matrix', AMatrix) or
|
|
|
not tempStorage.PointFEquals('origin', Origin) or
|
|
|
not tempStorage.PointFEquals('x-axis', XAxis) or
|
|
|
not tempStorage.PointFEquals('y-axis', YAxis) or
|
|
@@ -1900,6 +1877,7 @@ begin
|
|
|
tempStorage.RemoveObject(tempRenderCurList[fileIdx]);
|
|
|
tempRenderCurList.Free;
|
|
|
|
|
|
+ tempStorage.RemoveAttribute('aliased');
|
|
|
tempStorage.RemoveAttribute('last-matrix');
|
|
|
tempStorage.RemoveAttribute('origin');
|
|
|
tempStorage.RemoveAttribute('x-axis');
|
|
@@ -2100,6 +2078,7 @@ begin
|
|
|
tempStorage.RemoveObject(tempRenderCurList[fileIdx]);
|
|
|
tempRenderCurList.Free;
|
|
|
|
|
|
+ tempStorage.Bool['aliased'] := Aliased;
|
|
|
tempStorage.AffineMatrix['last-matrix'] := AMatrix;
|
|
|
tempStorage.PointF['origin'] := Origin;
|
|
|
tempStorage.PointF['x-axis'] := XAxis;
|