mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-26 20:07:14 +01:00
fpvectorial: Fix misplaced rounded rectangle painted on canvas.
This commit is contained in:
parent
f26def2c25
commit
cd60db2407
@ -6347,6 +6347,7 @@ var
|
|||||||
cc: T3dPointsArray = nil;
|
cc: T3dPointsArray = nil;
|
||||||
ctr: T3dPoint;
|
ctr: T3dPoint;
|
||||||
refPt: T3dPoint;
|
refPt: T3dPoint;
|
||||||
|
refPtRot: T3dPoint;
|
||||||
shift: T3dPoint;
|
shift: T3dPoint;
|
||||||
j: Integer;
|
j: Integer;
|
||||||
phi, lYAdj: Double;
|
phi, lYAdj: Double;
|
||||||
@ -6394,9 +6395,10 @@ begin
|
|||||||
pts[j] := Rotate3DPointInXY(pts[j], ctr, phi);
|
pts[j] := Rotate3DPointInXY(pts[j], ctr, phi);
|
||||||
for j := 0 to High(cc) do
|
for j := 0 to High(cc) do
|
||||||
cc[j] := Rotate3DPointInXY(cc[j], ctr, phi);
|
cc[j] := Rotate3DPointInXY(cc[j], ctr, phi);
|
||||||
|
refPtRot := Rotate3DPointInXY(refPt, ctr, phi); // refPt after rotation
|
||||||
|
|
||||||
// Perform the translation so that top/left corner is back at its original position.
|
// Perform the translation so that the refPt is back at its original position.
|
||||||
shift := Make3dPoint(refPt.x - pts[0].x, refPt.y - pts[0].y);
|
shift := Make3dPoint(refPt.x - refPtRot.x, refPt.y - refPtRot.y);
|
||||||
for j := 0 to High(pts) do
|
for j := 0 to High(pts) do
|
||||||
pts[j] := Offset3dPoint(pts[j], shift);
|
pts[j] := Offset3dPoint(pts[j], shift);
|
||||||
for j := 0 to High(cc) do
|
for j := 0 to High(cc) do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user