mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 11:19:23 +02:00
fpvectorial-html: (last commit fixed inverted vectorial image rendering) Fixes multiline text inside table cells
git-svn-id: trunk@51959 -
This commit is contained in:
parent
5aa799810a
commit
d7aa15e3e2
@ -5561,16 +5561,16 @@ end;
|
|||||||
function TvText.GetEntityFeatures(ADest: TFPCustomCanvas): TvEntityFeatures;
|
function TvText.GetEntityFeatures(ADest: TFPCustomCanvas): TvEntityFeatures;
|
||||||
var
|
var
|
||||||
ActualText: String;
|
ActualText: String;
|
||||||
lHeight_px: Integer;
|
lHeight_px: Integer = 0;
|
||||||
begin
|
begin
|
||||||
Result.DrawsUpwardHeightAdjustment := 0;
|
Result.DrawsUpwardHeightAdjustment := 0;
|
||||||
if Value.Count > 0 then
|
if Value.Count > 0 then
|
||||||
begin
|
begin
|
||||||
ActualText := Value.Text;
|
//ActualText := Value.Text;
|
||||||
Value.Text := Value.Strings[0];
|
//Value.Text := Value.Strings[0];
|
||||||
CalculateHeightInCanvas(ADest, lHeight_px);
|
CalculateHeightInCanvas(ADest, lHeight_px);
|
||||||
Result.DrawsUpwardHeightAdjustment := lHeight_px;
|
Result.DrawsUpwardHeightAdjustment := lHeight_px;
|
||||||
Value.Text := ActualText;
|
//Value.Text := ActualText;
|
||||||
end;
|
end;
|
||||||
Result.DrawsUpwards := True;
|
Result.DrawsUpwards := True;
|
||||||
end;
|
end;
|
||||||
@ -8090,8 +8090,8 @@ begin
|
|||||||
OldTextY := lText.Y;
|
OldTextY := lText.Y;
|
||||||
CurX := CoordToCanvasX(lText.X + X + lCurWidth, ADestX, AMulX);
|
CurX := CoordToCanvasX(lText.X + X + lCurWidth, ADestX, AMulX);
|
||||||
lText.X := 0;
|
lText.X := 0;
|
||||||
lText.Y := lText.Y + Y;
|
lText.Y := 0;
|
||||||
CurY := CoordToCanvasY(lText.Y, ADestY, AMulY);
|
CurY := CoordToCanvasY(lText.Y + Y, ADestY, AMulY) + lHeight_px;
|
||||||
lText.Render_Use_NextText_X := not lFirstText;
|
lText.Render_Use_NextText_X := not lFirstText;
|
||||||
if lText.Render_Use_NextText_X then
|
if lText.Render_Use_NextText_X then
|
||||||
lText.Render_NextText_X := lPrevText.Render_NextText_X;
|
lText.Render_NextText_X := lPrevText.Render_NextText_X;
|
||||||
@ -8100,7 +8100,7 @@ begin
|
|||||||
if Style <> nil then
|
if Style <> nil then
|
||||||
Style.ApplyIntoEntity(lText);
|
Style.ApplyIntoEntity(lText);
|
||||||
|
|
||||||
lText.Render(ADest, lEntityRenderInfo, CurX, ADestY, AMulX, AMulY, ADoDraw);
|
lText.Render(ADest, lEntityRenderInfo, CurX, CurY, AMulX, AMulY, ADoDraw);
|
||||||
lText.CalculateBoundingBox(ADest, lLeft, lTop, lRight, lBottom);
|
lText.CalculateBoundingBox(ADest, lLeft, lTop, lRight, lBottom);
|
||||||
lCurWidth := lCurWidth + Abs(lRight - lLeft);
|
lCurWidth := lCurWidth + Abs(lRight - lLeft);
|
||||||
lFirstText := False;
|
lFirstText := False;
|
||||||
|
Loading…
Reference in New Issue
Block a user