mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 00:19:15 +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;
|
LowerDim: T3DPoint;
|
||||||
XAnchorAdjustment: Integer;
|
XAnchorAdjustment: Integer;
|
||||||
lLongestLine, lLineWidth: Integer;
|
lLongestLine, lLineWidth, lFontSizePx: Integer;
|
||||||
lText: string;
|
lText: string;
|
||||||
{$ifdef USE_LCL_CANVAS}
|
{$ifdef USE_LCL_CANVAS}
|
||||||
ACanvas: TCanvas absolute ADest;
|
ACanvas: TCanvas absolute ADest;
|
||||||
@ -4272,13 +4272,15 @@ begin
|
|||||||
// TvText supports multiple lines
|
// TvText supports multiple lines
|
||||||
for i := 0 to Value.Count - 1 do
|
for i := 0 to Value.Count - 1 do
|
||||||
begin
|
begin
|
||||||
if Font.Size = 0 then
|
lFontSizePx := Font.Size;
|
||||||
LowerDim.Y := CoordToCanvasY(Y) + 12 * (i - Value.Count)
|
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
|
else
|
||||||
begin
|
LowerDim.Y := CoordToCanvasY(Y) + lFontSizePx * 1.2 * i;
|
||||||
LowerDim.Y := Y + Font.Size * 1.2 * (Value.Count - i);
|
|
||||||
LowerDim.Y := CoordToCanvasY(LowerDim.Y);
|
|
||||||
end;
|
|
||||||
|
|
||||||
ADest.Font.FPColor := AdjustColorToBackground(Font.Color, ARenderInfo);
|
ADest.Font.FPColor := AdjustColorToBackground(Font.Color, ARenderInfo);
|
||||||
lText := Value.Strings[i];
|
lText := Value.Strings[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user