aggpas: Fix clipping on AggLCLCanvas, issue #40210

This commit is contained in:
wp_xyz 2023-04-15 22:37:55 +02:00
parent 2ae1edf24e
commit d2eae5b3d0

View File

@ -542,6 +542,8 @@ type
procedure SetHeight(AValue: integer); override;
procedure SetWidth(AValue: integer); override;
procedure OnImageOperation(Img: TAggFPImage; Operation: TAggFPImgOperation); virtual;
procedure SetClipping(const AValue: Boolean); override;
procedure SetClipRect(const AValue: TRect); override;
public
constructor Create;
destructor Destroy; override;
@ -3322,6 +3324,19 @@ begin
end;
procedure TAggFPCanvas.SetClipping(const AValue: Boolean);
begin
inherited;
m_rasterizer.m_clipping := AValue;
end;
procedure TAggFPCanvas.SetClipRect(const AValue: TRect);
begin
m_rasterizer.clip_box(AValue.Left, AValue.Top, AValue.Right, AValue.Bottom);
m_rasterizer.m_clipping := Clipping;
end;
{ TAggFPPen }
procedure TAggFPPen.SetFPColor(const AValue: TFPColor);