H
hwxie
Unregistered / Unconfirmed
GUEST, unregistred user!
如这个类如何使用DLL封装:
TGraphics = class
private
FSelected: Boolean;
FMoving: Boolean;
FResizing: Boolean;
procedure SetSelected(Value: Boolean);
protected
property Moving: Boolean read FMoving write FMoving;
property Resizing: Boolean read FResizing write FResizing;
public
function PointInside(APoint: TPoint): Boolean
virtual
abstract;
function PointInResizeControl(APoint: TPoint): Boolean
virtual
abstract;
function GetResizeCursor(APoint: TPoint): TCursor
virtual
abstract;
procedure Paint(ACanvas: TCanvas)
virtual
abstract;
procedure Select
virtual;
procedure UnSelect
virtual;
procedure Move(ACanvas: TCanvas
offsetX, offsetY: Integer)
virtual
abstract;
procedure ReSize(ACanvas: TCanvas
CurPoint: TPoint)
virtual
abstract;
property Selected: Boolean read FSelected write SetSelected;
end;
TGraphics = class
private
FSelected: Boolean;
FMoving: Boolean;
FResizing: Boolean;
procedure SetSelected(Value: Boolean);
protected
property Moving: Boolean read FMoving write FMoving;
property Resizing: Boolean read FResizing write FResizing;
public
function PointInside(APoint: TPoint): Boolean
virtual
abstract;
function PointInResizeControl(APoint: TPoint): Boolean
virtual
abstract;
function GetResizeCursor(APoint: TPoint): TCursor
virtual
abstract;
procedure Paint(ACanvas: TCanvas)
virtual
abstract;
procedure Select
virtual;
procedure UnSelect
virtual;
procedure Move(ACanvas: TCanvas
offsetX, offsetY: Integer)
virtual
abstract;
procedure ReSize(ACanvas: TCanvas
CurPoint: TPoint)
virtual
abstract;
property Selected: Boolean read FSelected write SetSelected;
end;