Class TCastleShape
Unit
Declaration
type TCastleShape = class(TCastleUserInterface)
Description
Draw a simple shape (rectangle, circle, triangle) with given color and optional outline.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleUserInterface
- TCastleShape
Overview
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
procedure Render; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
property Color: TCastleColor read FColor write SetColor; |
|
property OutlineColor: TCastleColor read FOutlineColor write SetOutlineColor; |
|
property ShapeType: TShapeType read FShapeType write SetShapeType default stRectangle; |
|
property OutlineThick: boolean read FOutlineThick write SetOutlineThick default false; |
|
property OutlineWidth: Single read FOutlineWidth write SetOutlineWidth
default 1.0; |
|
property Outline: boolean read FOutline write SetOutline default false; |
|
property Filled: boolean read FFilled write SetFilled default true; |
|
property ColorPersistent: TCastleColorPersistent read FColorPersistent ; |
|
property OutlineColorPersistent: TCastleColorPersistent read FOutlineColorPersistent ; |
Description
Methods
constructor Create(AOwner: TComponent); override; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
procedure Render; override; |
|
This item has no description. Showing description inherited from TCastleUserInterface.Render. Render a control. Called only when Exists and render context is initialized. Do not call this method. It will be automatically called by the engine when needed. It will be called when UI is part of TCastleContainer.Controls list or rendered (e.g. for off-screen rendering) by TCastleContainer.RenderControl. You should only override this method. See https://castle-engine.io/manual_2d_ui_custom_drawn.php for examples what you can put here. You can depend on some OpenGL state being set before calling this method. You can depend on it being set, and you can carelessly change it. This state we set:
Beware that GLSL RenderContext.CurrentProgram has undefined value when this is called. You should always set it, before making direct OpenGL drawing calls (all the engine drawing routines do it already, this is only a concern if you make direct OpenGL / OpenGLES calls). |
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
This item has no description. Showing description inherited from TCastleComponent.PropertySections. Section where to show property in the editor. |
Properties
property Color: TCastleColor read FColor write SetColor; |
|
The fill color, used if Filled. By default, opaque white. |
property OutlineColor: TCastleColor read FOutlineColor write SetOutlineColor; |
|
The outline color, used if Outline. By default, opaque black. |
property ShapeType: TShapeType read FShapeType write SetShapeType default stRectangle; |
|
The shape (rectangle, circle, triangle) to be drawn. |
property OutlineThick: boolean read FOutlineThick write SetOutlineThick default false; |
|
Determines the drawing method of the outline, used if Outline.
|
property OutlineWidth: Single read FOutlineWidth write SetOutlineWidth
default 1.0; |
|
The outline width, used if Outline. It is affected by UI scaling. If OutlineThick is |
property Outline: boolean read FOutline write SetOutline default false; |
|
Display outline of the shape using OutlineColor. |
property Filled: boolean read FFilled write SetFilled default true; |
|
Display inside of the shape using Color. |
property ColorPersistent: TCastleColorPersistent read FColorPersistent ; |
|
Color that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Color directly. See also |
property OutlineColorPersistent: TCastleColorPersistent read FOutlineColorPersistent ; |
|
OutlineColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write OutlineColor directly. See also
|
Generated by PasDoc 0.16.0-snapshot.