mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 15:19:29 +02:00
fpvectorial: Fix text position when rendering svg files.
This commit is contained in:
parent
2db4892771
commit
020d5d64ad
@ -5758,6 +5758,10 @@ begin
|
|||||||
ABottom := Y;
|
ABottom := Y;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ (X, Y) are the fpvectorial coordinatex of the left edge of the BASELINE (!)
|
||||||
|
of the first character box.
|
||||||
|
The character is painted, however, relative to the TOP/left corner of the
|
||||||
|
character box, in pixels. }
|
||||||
procedure TvText.Render(var ARenderInfo: TvRenderInfo; ADoDraw: Boolean);
|
procedure TvText.Render(var ARenderInfo: TvRenderInfo; ADoDraw: Boolean);
|
||||||
const
|
const
|
||||||
LINE_SPACING = 0.2; // fraction of font height for line spacing
|
LINE_SPACING = 0.2; // fraction of font height for line spacing
|
||||||
@ -5831,6 +5835,8 @@ begin
|
|||||||
// ...
|
// ...
|
||||||
// We need to keep the order of lines drawing correct regardless of
|
// We need to keep the order of lines drawing correct regardless of
|
||||||
// the drawing direction
|
// the drawing direction
|
||||||
|
// Since we have pixels now we need not take care about whether
|
||||||
|
// Page.TopLeftCoordinates is active or not!
|
||||||
curDimY := refPt.Y - (lTextSize.CY - lDescender);
|
curDimY := refPt.Y - (lTextSize.CY - lDescender);
|
||||||
|
|
||||||
// TvText supports multiple lines
|
// TvText supports multiple lines
|
||||||
|
@ -3206,7 +3206,7 @@ begin
|
|||||||
// text spans
|
// text spans
|
||||||
|
|
||||||
lParagraph := TvParagraph.Create(AData);
|
lParagraph := TvParagraph.Create(AData);
|
||||||
lParagraph.YPos_NeedsAdjustment_DelFirstLineBodyHeight := True;
|
lParagraph.YPos_NeedsAdjustment_DelFirstLineBodyHeight := false; // wp: was True
|
||||||
lTextSpanStack := TSVGObjectStack.Create;
|
lTextSpanStack := TSVGObjectStack.Create;
|
||||||
lCurStyle := TSVGTextSpanStyle.Create;
|
lCurStyle := TSVGTextSpanStyle.Create;
|
||||||
lTextSpanStack.Push(lCurStyle);
|
lTextSpanStack.Push(lCurStyle);
|
||||||
|
Loading…
Reference in New Issue
Block a user