You've already forked lazarus-ccr
Adds support for pen width in eps input and canvas output, advances the eps reader but still cant fix all problems with the test image
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1885 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -81,6 +81,9 @@ type
|
||||
ClipPath: TPath;
|
||||
ClipMode: TvClipMode;
|
||||
OverPrint: Boolean; // not used currently
|
||||
//
|
||||
PenWidth: Integer;
|
||||
//
|
||||
function Duplicate: TGraphicState;
|
||||
end;
|
||||
|
||||
@ -1531,6 +1534,7 @@ begin
|
||||
WriteLn('[TvEPSVectorialReader.ExecutePathConstructionOperator] newpath');
|
||||
{$endif}
|
||||
AData.SetClipPath(CurrentGraphicState.ClipPath, CurrentGraphicState.ClipMode);
|
||||
AData.SetPenWidth(CurrentGraphicState.PenWidth);
|
||||
AData.EndPath();
|
||||
AData.StartPath();
|
||||
|
||||
@ -1692,8 +1696,8 @@ begin
|
||||
begin
|
||||
AData.SetPenStyle(psClear);
|
||||
AData.EndPath();
|
||||
//CurrentGraphicState.ClipPath := AData.GetPath(AData.GetPathCount()-1);
|
||||
//CurrentGraphicState.ClipMode := vcmEvenOddRule;
|
||||
CurrentGraphicState.ClipPath := AData.GetPath(AData.GetPathCount()-1);
|
||||
CurrentGraphicState.ClipMode := vcmEvenOddRule;
|
||||
Exit(True);
|
||||
end
|
||||
end;
|
||||
@ -1781,6 +1785,7 @@ begin
|
||||
if AToken.StrValue = 'setlinewidth' then
|
||||
begin
|
||||
Param1 := TPSToken(Stack.Pop);
|
||||
CurrentGraphicState.PenWidth := Round(Param1.FloatValue);
|
||||
Exit(True);
|
||||
end;
|
||||
// int setlinecap – Set shape of line ends for stroke (0 = butt,
|
||||
|
@ -169,7 +169,8 @@ begin
|
||||
|
||||
// Set the path Pen and Brush options
|
||||
ADest.Pen.Style := CurPath.Pen.Style;
|
||||
ADest.Pen.Width := CurPath.Pen.Width;
|
||||
ADest.Pen.Width := Round(CurPath.Pen.Width * AMulX);
|
||||
if ADest.Pen.Width < 1 then ADest.Pen.Width := 1;
|
||||
ADest.Pen.FPColor := CurPath.Pen.Color;
|
||||
ADest.Brush.FPColor := CurPath.Brush.Color;
|
||||
|
||||
|
Reference in New Issue
Block a user