mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +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;
|
||||
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);
|
||||
const
|
||||
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
|
||||
// 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);
|
||||
|
||||
// TvText supports multiple lines
|
||||
|
@ -3206,7 +3206,7 @@ begin
|
||||
// text spans
|
||||
|
||||
lParagraph := TvParagraph.Create(AData);
|
||||
lParagraph.YPos_NeedsAdjustment_DelFirstLineBodyHeight := True;
|
||||
lParagraph.YPos_NeedsAdjustment_DelFirstLineBodyHeight := false; // wp: was True
|
||||
lTextSpanStack := TSVGObjectStack.Create;
|
||||
lCurStyle := TSVGTextSpanStyle.Create;
|
||||
lTextSpanStack.Push(lCurStyle);
|
||||
|
Loading…
Reference in New Issue
Block a user