Browse Source

* canvas clipping getters and setters virtual, as per mantis 13607

git-svn-id: trunk@13057 -
marco 16 năm trước cách đây
mục cha
commit
7945af2f85
2 tập tin đã thay đổi với 13 bổ sung1 xóa
  1. 10 0
      packages/fcl-image/src/fpcanvas.inc
  2. 3 1
      packages/fcl-image/src/fpcanvas.pp

+ 10 - 0
packages/fcl-image/src/fpcanvas.inc

@@ -120,6 +120,11 @@ begin
     end;
 end;
 
+function TFPCustomCanvas.GetClipping: boolean;
+begin
+  Result:=FClipping;
+end;
+
 function TFPCustomCanvas.GetClipRect: TRect;
 begin
   Result:=FClipRect;
@@ -243,6 +248,11 @@ begin
     result := FDefaultPen;
 end;
 
+procedure TFPCustomCanvas.SetClipping(const AValue: boolean);
+begin
+  FClipping:=AValue;
+end;
+
 procedure TFPCustomCanvas.SetClipRect(const AValue: TRect);
 begin
   FClipRect:=AValue;

+ 3 - 1
packages/fcl-image/src/fpcanvas.pp

@@ -233,6 +233,8 @@ type
     function  GetWidth : integer; virtual; abstract;
     function  GetClipRect: TRect; virtual;
     procedure SetClipRect(const AValue: TRect); virtual;
+    function  GetClipping: boolean; virtual;
+    procedure SetClipping(const AValue: boolean); virtual;
     procedure SetPenPos(const AValue: TPoint); virtual;
     procedure DoLockCanvas; virtual;
     procedure DoUnlockCanvas; virtual;
@@ -304,7 +306,7 @@ type
     property Interpolation : TFPCustomInterpolation read FInterpolation write FInterpolation;
     property Colors [x,y:integer] : TFPColor read GetColor write SetColor;
     property ClipRect : TRect read GetClipRect write SetClipRect;
-    property Clipping : boolean read FClipping write FClipping;
+    property Clipping : boolean read GetClipping write SetClipping;
     property PenPos : TPoint read FPenPos write SetPenPos;
     property Height : integer read GetHeight write SetHeight;
     property Width : integer read GetWidth write SetWidth;