Class TAdRenderingSurface

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAdRenderingSurface = class(TAdSurface)

Description

A basic, abstract surface class that extends TAdSurface and adds its own canvas and scene object.

Hierarchy

Overview

Methods

Public constructor Create(ADraw:TAdDraw); override;
Public destructor Destroy; override;
Public procedure ClearSurface(AColor: LongInt); overload; virtual;
Public procedure ClearSurface(AColor: TAndorraColor); overload; virtual;
Public procedure Setup2DScene;

Properties

Public property Canvas: TAdCanvas read FCanvas;
Public property Scene: TAdScene read FScene;
Public property Options: TAd2dOptions read FOptions write SetOptions;
Public property DisplayRect: TAdRect read GetDisplayRect;
Public property Width: integer read GetWidth;
Public property Height: integer read GetHeight;

Description

Methods

Public constructor Create(ADraw:TAdDraw); override;

Creates an instance of TAdRenderingSurface. Remember that TAdRenderingSurface is an abstract class, that should not be created directly. Use TAdDraw or TAdTextureSurface instead.

Public destructor Destroy; override;

Destroys the instance of TAdRenderingSurface.

Public procedure ClearSurface(AColor: LongInt); overload; virtual;

Clears the surface using a 24 Bit color. You may use the color constants provided by Delphi/Lazarus or the 24 Bit color constants in the AdConsts unit or use the RGB function from the unit AdTypes. This function clears the color buffer, the stencil buffer (clear value 0) and the Z-Buffer (clear value 1).

Public procedure ClearSurface(AColor: TAndorraColor); overload; virtual;

Clears the surface using a 32 Andorra color value. You may use the color constants from the unit AdConsts or the Ad_ARGB function. If your using a transparent value when clearing a rendering surface, the surface is filled with that transparent color so that you may draw it over other objects. This function clears the color buffer, the stencil buffer (clear value 0) and the Z-Buffer (clear value 1).

Public procedure Setup2DScene;

Calls Scene.Setup2DScene with the width and the height of the surface. The viewport is changed, so that it covers the whole screen. After calling Setup2DScene the relative and the absolute coordinate system are equal.

Properties

Public property Canvas: TAdCanvas read FCanvas;

A hardware accelerated canvas. All drawing operations will automatically be made on the owner of the canvas property.

Public property Scene: TAdScene read FScene;

This is the place where the scene settings for the surface are made.

See also
TAdScene
Simple class that copes with scene management.
Public property Options: TAd2dOptions read FOptions write SetOptions;

Options that control the rendering process. When TAdRenderingSurface is created, the options are copied from the parent TAdDraw.

Public property DisplayRect: TAdRect read GetDisplayRect;

DisplayRect returns the size of the current szene. Those coordinates are relative.

Public property Width: integer read GetWidth;

The width of the surface in pixels. Absolute coordinates. Use the scene property to get the relative width of the surface.

Public property Height: integer read GetHeight;

The height of the surface in pixels. Absolure coordinates. Use the scene property to get the relative height of the surface.

SourceForge.net Logo


Generated by PasDoc 0.11.0 on 2008-12-31 14:31:59