To bad that we can't write (under FMX)
To bad that we can't write (under FMX)
Bitmap.Canvas.FillPolygon([PointF(0,0), PointF(0,10), PointF(15,25)],100);
FillPolygon accepts only a TPolygon, not an array of TPointF (in fact a TPolygon !)
this function can be used, but it's a shame !
function Polygon(const Points: array of TPointF): TPolygon;
begin
SetLength(Result, Length(Points));
Move(Points[0], Result[0], Length(Points) * SizeOf(TPointF));
end;
Bitmap.Canvas.FillPolygon([PointF(0,0), PointF(0,10), PointF(15,25)],100);
FillPolygon accepts only a TPolygon, not an array of TPointF (in fact a TPolygon !)
this function can be used, but it's a shame !
function Polygon(const Points: array of TPointF): TPolygon;
begin
SetLength(Result, Length(Points));
Move(Points[0], Result[0], Length(Points) * SizeOf(TPointF));
end;
Comments
Post a Comment