mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 21:46:00 +02:00
+ colors array will be clipped when Clipping=true
This commit is contained in:
parent
5bf7db653e
commit
3553353ae8
@ -39,6 +39,8 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
uses clipping;
|
||||||
|
|
||||||
constructor TFPImageCanvas.create (AnImage : TFPCustomImage);
|
constructor TFPImageCanvas.create (AnImage : TFPCustomImage);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
@ -53,7 +55,8 @@ end;
|
|||||||
procedure TFPImageCanvas.SetColor (x,y:integer; AValue:TFPColor);
|
procedure TFPImageCanvas.SetColor (x,y:integer; AValue:TFPColor);
|
||||||
begin
|
begin
|
||||||
if (x >= 0) and (x < width) and (y >= 0) and (y < height) then
|
if (x >= 0) and (x < width) and (y >= 0) and (y < height) then
|
||||||
FImage.Colors[x,y] := AValue;
|
if not clipping or PointInside (x,y, ClipRect) then
|
||||||
|
FImage.Colors[x,y] := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFPImageCanvas.GetColor (x,y:integer) : TFPColor;
|
function TFPImageCanvas.GetColor (x,y:integer) : TFPColor;
|
||||||
|
Loading…
Reference in New Issue
Block a user