You are not logged in.
Pages: 1
Hi,
I use your library to export Fast-Report report and it it works well.
But, there is one problem when underline is affect to font.style.
in procedure DrawLine in SynPdf.pas, WithClip variable is set to False, but never reset to his old value.
After this, nothing is drawn.
I propose to fix as Below :
procedure DrawLine(var P: TPoint; aH: Single);
var
tmp: TPdfEnumStatePen;
BakWithCli: Boolean;
BakbOpaque: boolean;
begin
BakWithCli := WithClip;
BakbOpaque := bOpaque;
try
WithClip := False;
bOpaque := False;
with DC[nDC] do begin
tmp := Pen;
pen.color := font.color;
pen.width := aSize / 15 / Canvas.GetWorldFactorX / Canvas.FDevScale;
pen.style := PS_SOLID;
pen.null := False;
NeedPen;
if font.spec.angle=0 then begin
Canvas.MoveToI(P.X,(P.Y-(H-aH)));
Canvas.LineToI(P.X+W+wW,(P.Y-(H-aH)));
end else begin
Canvas.MoveToI(P.X+(W*acos-(H-aH)*asin), P.Y-(((H-aH)*acos-W*asin)));
Canvas.LineToI(P.X+((W+wW)*acos-(H-aH)*asin),P.Y-(((H-aH)*acos-(W-wW)*asin)));
end;
Canvas.Stroke;
Pen := tmp;
end;
finally
WithClip := BakWithCli;
bOpaque := BakbOpaque;
end;
end;
Fabien.
Offline
I suspect both withClip := false and bOpaque := false are just not needed.
It is not even needed to save them.
Since they are not used within the procedure (MoveTo/LineTo do not use those).
Offline
Pages: 1