Class TCastleText
Unit
CastleScene
Declaration
type TCastleText = class(TCastleAbstractPrimitive)
Description
Text that is displayed and transformed as TCastleTransform, inside TCastleViewport, and can be manipulated in 3D.
Hierarchy
Overview
Methods
Properties
Description
Methods
|
function GetInternalText: String; override; |
|
|
procedure SetInternalText(const Value: String); override; |
|
|
constructor Create(AOwner: TComponent); override; |
|
|
destructor Destroy; override; |
|
Properties
|
property Caption: String read GetCaption write SetCaption stored false; |
Text displayed, expressed by a simple String. This is just a shortcut to get/set Text as a single String.
Use LineEnding or NL constant when setting this to indicate a newline. The two examples below are equivalent:
MyText.Text.Clear;
MyText.Text.Add('First line');
MyText.Text.Add('Second line');
MyText.Caption := 'First line' + LineEnding + 'Second line';
|
|
property Text: TStrings read FText write SetText; |
Text displayed, with each line as a separate String. Setting this property merely copies the contents using TStrings.Assign.
|
|
property CaptionTranslate: Boolean read FCaptionTranslate write FCaptionTranslate default true; |
Should the Caption be localized (translated into other languages). Determines if the property is enumerated by TCastleComponent.TranslateProperties, which affects the rest of localization routines.
|
|
property Material default pmUnlit; |
Text is by default unlit.
|
|
property DoubleSided: Boolean read FDoubleSided write SetDoubleSided default true; |
When this is True , the object is visible (and lit) from both sides.
Note that the default for TCastleText is different than the default for most other primitives, like TCastleBox and TCastleSphere: by default text is double-sided, while most other primitives by default are not double-sided. Set this property to False for more performance in case camera may be behind the text. The reason for different default is that text object doesn't have an obvious "interior", unlike a box of sphere, so you can more easily land behind the text (and get confused why is it not displayed). This follows X3D TTextNode.Solid default.
|
|
property VerticalAlignment: TVerticalPosition
read FVerticalAlignment write SetVerticalAlignment default vpBottom; |
Vertical alignment of the text.
|
|
property CustomFont: TCastleFont read FCustomFont write SetCustomFont; |
Adjust the font.
|
Generated by PasDoc 0.16.0.