|
@@ -95,6 +95,7 @@ type
|
|
|
const aImage: TFPCustomImage); override;
|
|
|
procedure FillRect(const aColor: TFPColor; const aRect: TFresnelRect); override;
|
|
|
procedure Line(const aColor: TFPColor; const x1, y1, x2, y2: TFresnelLength); override;
|
|
|
+ procedure Polygon(const aColor: TFPColor; const p: PFresnelPoint; Count: integer); override;
|
|
|
procedure Restore; override;
|
|
|
procedure RoundRect(const aColor: TFPColor; const aRect: TFresnelRoundRect;
|
|
|
Fill: Boolean); override;
|
|
@@ -312,6 +313,25 @@ begin
|
|
|
Canvas.Line(round(Origin.X+x1),round(Origin.Y+y1),round(Origin.X+x2),round(Origin.Y+y2));
|
|
|
end;
|
|
|
|
|
|
+procedure TFresnelLCLRenderer.Polygon(const aColor: TFPColor; const p: PFresnelPoint; Count: integer
|
|
|
+ );
|
|
|
+var
|
|
|
+ Points: array of TPoint;
|
|
|
+ i: Integer;
|
|
|
+begin
|
|
|
+ if (p=nil) or (Count<3) then exit;
|
|
|
+ Canvas.Brush.FPColor:=aColor;
|
|
|
+ Canvas.Brush.Style:=bsSolid;
|
|
|
+ Points:=[];
|
|
|
+ SetLength(Points,Count);
|
|
|
+ for i:=0 to Count-1 do
|
|
|
+ begin
|
|
|
+ Points[i].X:=round(Origin.X+p[i].X);
|
|
|
+ Points[i].Y:=round(Origin.Y+p[i].Y);
|
|
|
+ end;
|
|
|
+ Canvas.Polygon(Points);
|
|
|
+end;
|
|
|
+
|
|
|
procedure TFresnelLCLRenderer.Restore;
|
|
|
begin
|
|
|
Canvas.RestoreHandleState;
|