mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 09:38:12 +02:00
fpvectorial: Fixes the order of text in multiline text
git-svn-id: trunk@49118 -
This commit is contained in:
parent
165a5fce27
commit
35cacd8537
@ -4237,7 +4237,7 @@ var
|
||||
//
|
||||
LowerDim: T3DPoint;
|
||||
XAnchorAdjustment: Integer;
|
||||
lLongestLine, lLineWidth: Integer;
|
||||
lLongestLine, lLineWidth, lFontSizePx: Integer;
|
||||
lText: string;
|
||||
{$ifdef USE_LCL_CANVAS}
|
||||
ACanvas: TCanvas absolute ADest;
|
||||
@ -4272,13 +4272,15 @@ begin
|
||||
// TvText supports multiple lines
|
||||
for i := 0 to Value.Count - 1 do
|
||||
begin
|
||||
if Font.Size = 0 then
|
||||
LowerDim.Y := CoordToCanvasY(Y) + 12 * (i - Value.Count)
|
||||
lFontSizePx := Font.Size;
|
||||
if lFontSizePx = 0 then lFontSizePx := 10;
|
||||
|
||||
// We need to keep the order of lines drawing correct regardless of
|
||||
// the drawing direction
|
||||
if AMulY < 0 then
|
||||
LowerDim.Y := CoordToCanvasY(Y) + lFontSizePx * 1.2 * (Value.Count - i)
|
||||
else
|
||||
begin
|
||||
LowerDim.Y := Y + Font.Size * 1.2 * (Value.Count - i);
|
||||
LowerDim.Y := CoordToCanvasY(LowerDim.Y);
|
||||
end;
|
||||
LowerDim.Y := CoordToCanvasY(Y) + lFontSizePx * 1.2 * i;
|
||||
|
||||
ADest.Font.FPColor := AdjustColorToBackground(Font.Color, ARenderInfo);
|
||||
lText := Value.Strings[i];
|
||||
|
Loading…
Reference in New Issue
Block a user