Description | Hierarchy | Fields | Methods | Properties |
type TAdCanvas = class(TObject)
TAdCanvas is a hardware accelerated canvas object, that may perform the most comon graphic operations in high speed. Remember that more specialiced functions of Andorra 2D are even faster than TAdCanvas. So if you e.g. only want to draw a image, use TAdImage instead.
constructor Create(AAppl:TAd2dApplication); |
|
destructor Destroy; override; |
|
procedure StartFrame; |
|
procedure EndFrame; |
|
procedure Release; |
|
function ReturnDisplayList:TAdCanvasDisplayList; |
|
procedure DrawObject(var AObj:TAdCanvasObject); |
|
procedure MoveTo(ax,ay:integer); overload; |
|
procedure LineTo(ax,ay:integer); overload; |
|
procedure MoveTo(ap:TAdPoint); overload; |
|
procedure LineTo(ap:TAdPoint); overload; |
|
procedure Line(ax1,ay1,ax2,ay2:integer); overload; |
|
procedure Line(ap1,ap2:TAdPoint); overload; |
|
procedure SplineMoveTo(ax, ay: integer); overload; |
|
procedure SplineMoveTo(ap: TAdPoint); overload; |
|
procedure SplineLineTo(ax, ay: integer); overload; |
|
procedure SplineLineTo(ap: TAdPoint); overload; |
|
procedure Arrow(ArrowSize, ArrowAngle:Integer; P1, P2:TAdPoint); |
|
procedure TextOut(AX, AY:integer; AText:string); overload; |
|
procedure Rectangle(AX1, AY1, AX2, AY2:integer); overload; |
|
procedure Rectangle(AR:TAdRect); overload; |
|
procedure Rectangle(AP1, AP2:TAdPoint); overload; |
|
procedure Rectangle(AP:TAdPoint; AWidth, AHeight:integer); overload; |
|
procedure PlotPixel(AX, AY:integer); overload; |
|
procedure PlotPixel(AX, AY:integer; AColor:TAndorraColor); overload; |
|
procedure Ellipse(AX1, AY1, AX2, AY2:integer); |
|
procedure Circle(ACX, ACY, AR:integer); |
|
procedure DrawColoredQuad(AQuad:TAdCanvasColorQuad); |
|
procedure DrawQuad(AQuad:TAdCanvasQuad); |
|
procedure Polygon(APolygon:TAdPolygon); |
|
procedure Polyline(APolygon: TAdPolygon); |
|
procedure Spline(ASpline: TAdPolygon); |
property Pen: TAdPen read FPen write FPen; |
|
property Brush: TAdBrush read FBrush write FBrush; |
|
property Font: TAdFont read FFont write FFont; |
|
property OnRelease: TAdNotifyEvent read FOnRelease write FOnRelease; |
|
property OnBeginFrame: TAdNotifyEvent read FOnBeginFrame write FOnBeginFrame; |
|
property OnEndFrame: TAdNotifyEvent read FOnEndFrame write FOnEndFrame; |
constructor Create(AAppl:TAd2dApplication); |
|
Creates an instance of TAdCanvas. |
destructor Destroy; override; |
|
Destroys an instance of TAdCanvas. |
procedure StartFrame; |
|
Does some preparations which have to be done at the beginning of a frame. Normally this function is automatically called by TAdRenderingSurface. |
procedure EndFrame; |
|
Finalizes the frame, does some memory-cleanup and calles release. Normally this function is automatically called by TAdRenderingSurface. |
procedure Release; |
|
The "Release" procedure draws the objects which are in the current display list and creates a new display list. See also
|
function ReturnDisplayList:TAdCanvasDisplayList; |
|
Returns the current display list without drawing and creates a new display list. Use ReturnDisplay list if you want to draw objects aside from TAdCanvas and without calling the draw functions each time. See also
|
procedure DrawObject(var AObj:TAdCanvasObject); |
|
Draws the specified canvas object. |
procedure MoveTo(ax,ay:integer); overload; |
|
Moves the start point of the line to the specified coordinates. See also |
procedure LineTo(ax,ay:integer); overload; |
|
Draws a line from the start point specified by "MoveTo" to the specified coordinates. See also |
procedure MoveTo(ap:TAdPoint); overload; |
|
Moves the start of the line to the specified coordinates. See also |
procedure LineTo(ap:TAdPoint); overload; |
|
Draws a line from the start point specified by "MoveTo" to the specified coordinates. See also |
procedure Line(ax1,ay1,ax2,ay2:integer); overload; |
|
Draws a line from the start point to the specified coordinates. See also |
procedure Line(ap1,ap2:TAdPoint); overload; |
|
Draws a line from the start point to the specified coordinates. See also |
procedure SplineMoveTo(ax, ay: integer); overload; |
|
Moves the start point of the line to the specified coordinates. |
procedure SplineMoveTo(ap: TAdPoint); overload; |
|
Moves the start point of the line to the specified coordinates. |
procedure SplineLineTo(ax, ay: integer); overload; |
|
Draws a spline from the start point specified by "SplineMoveTo" to the specified coordinates. |
procedure SplineLineTo(ap: TAdPoint); overload; |
|
Draws a spline from the start point specified by "SplineMoveTo" to the specified coordinates. |
procedure Arrow(ArrowSize, ArrowAngle:Integer; P1, P2:TAdPoint); |
|
Draws an arrow from P1 to P2. ArrowSize specifies the length of the a rrowhead. ArrowAngle specifies the inner angle between the to arrowhead lines. |
procedure TextOut(AX, AY:integer; AText:string); overload; |
|
Draws a text using the font specified in the "Font" property. |
procedure Rectangle(AX1, AY1, AX2, AY2:integer); overload; |
|
Draws a rectangle. |
procedure Rectangle(AR:TAdRect); overload; |
|
Draws a rectangle. |
procedure Rectangle(AP1, AP2:TAdPoint); overload; |
|
Draws a rectangle. |
procedure Rectangle(AP:TAdPoint; AWidth, AHeight:integer); overload; |
|
Draws a rectangle. |
procedure PlotPixel(AX, AY:integer); overload; |
|
Draws a single pixel using the color specified in TAdPen.Color |
procedure PlotPixel(AX, AY:integer; AColor:TAndorraColor); overload; |
|
Draws a single pixel using the color specified in the "AColor" parameter. |
procedure Ellipse(AX1, AY1, AX2, AY2:integer); |
|
Draws an ellipse within the specified coordinates. |
procedure Circle(ACX, ACY, AR:integer); |
|
Draws a circle with the center "acx;acy" and the readius "ar". |
procedure DrawColoredQuad(AQuad:TAdCanvasColorQuad); |
|
Draws a colored quad. . See also
|
procedure DrawQuad(AQuad:TAdCanvasQuad); |
|
Draws a simple quad using the color specified in "Brush". See also
|
procedure Polygon(APolygon:TAdPolygon); |
|
Draws a simple polygon. The polygon points have to be in clockwise order and may not contain any intersections. |
procedure Polyline(APolygon: TAdPolygon); |
|
Draws a poly line. |
procedure Spline(ASpline: TAdPolygon); |
|
Draws a spline. |
property Pen: TAdPen read FPen write FPen; |
|
The pen object, which represents the settings for the outline of the objects. See also
|
property Brush: TAdBrush read FBrush write FBrush; |
|
The brush object, which represents the settings for the filling of the objects. See also
|
property Font: TAdFont read FFont write FFont; |
|
Set the "Font" property to the font you would like to use with "TextOut". |
property OnRelease: TAdNotifyEvent read FOnRelease write FOnRelease; |
|
This event triggered, when the "release" method of TAdCanvas is called. "OnRelease" is used internally by TAdRenderingSurface. When the release method of its own canvas is called, TAdRenderingSurface automatically sets itself to the current active surfacre. See also
|
property OnBeginFrame: TAdNotifyEvent read FOnBeginFrame write FOnBeginFrame; |
|
The "OnBeginFrame" event is triggered, when the "BeginFrame" method of TAdCanvas is called. |
property OnEndFrame: TAdNotifyEvent read FOnEndFrame write FOnEndFrame; |
|
The "OnEndFrame" event is triggered, when the "EndFrame" method of TAdCanvas is called. |