Class TSFImage
Unit
Declaration
type TSFImage = class(TX3DSingleField)
Description
X3D field containing an image that is "embedded" in the X3D file.
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DFieldOrEvent
- TX3DField
- TX3DSingleField
- TSFImage
Overview
Methods
![]() |
constructor Create(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: string; const AValue: TCastleImage); |
![]() |
constructor CreateUndefined(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: string); override; |
![]() |
destructor Destroy; override; |
![]() |
procedure ParseValue(Lexer: TX3DLexer; Reader: TX3DReader); override; |
![]() |
function Equals(SecondValue: TX3DField): boolean; override; |
![]() |
procedure Assign(Source: TPersistent); override; |
![]() |
procedure AssignValue(Source: TX3DField); override; |
![]() |
class function X3DType: string; override; |
![]() |
class function CreateEvent(const AParentNode: TX3DFileItem; const AName: string; const AInEvent: boolean): TX3DEvent; override; |
Properties
![]() |
property Value: TCastleImage read FValue write SetValue; |
Description
Methods
![]() |
constructor Create(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: string; const AValue: TCastleImage); |
This item has no description. Parameters
|
![]() |
constructor CreateUndefined(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: string); override; |
This item has no description. Showing description inherited from TX3DField.CreateUndefined. Virtual constructor, that you can use to construct field instance when field class is known only at runtime. The idea is that in some cases, you need to create fields using variable like FieldClass: TX3DFieldClass. See e.g. TX3DInterfaceDeclaration, VRML 2.0 feature that simply requires this ability, also implementation of TX3DSimpleMultField.Parse and TX3DSimpleMultField.CreateItemBeforeParse. Later you can initialize such instance from string using it's Parse method. Note that some exceptional fields simply cannot work when initialized by this constructor: these are SFEnum and SFBitMask fields. They simply need to know their TSFEnum.EnumNames, or TSFBitMask.FlagNames + TSFBitMask.NoneString + TSFBitMask.AllString before they can be parsed. I guess that's one of the reasons why these field types were entirely removed from VRML 2.0. |
![]() |
destructor Destroy; override; |
This item has no description. |
![]() |
procedure ParseValue(Lexer: TX3DLexer; Reader: TX3DReader); override; |
This item has no description. |
![]() |
function Equals(SecondValue: TX3DField): boolean; override; |
This item has no description. Showing description inherited from TX3DField.Equals.
All descendants (that add some property that should be compared) should override this like Result := (inherited Equals(SecondValue)) and (SecondValue is TMyType) and (TMyType(SecondValue).MyProperty = MyProperty);
The floating-point fields may be compared with a small epsilon tolerance by this method. Note that this *doesn't* compare the default values of two fields instances. This compares only the current values of two fields instances, and eventually some other properties that affect parsing (like names for TSFEnum and TSFBitMask) or allowed future values (like TSFFloat.MustBeNonnegative). |
![]() |
procedure Assign(Source: TPersistent); override; |
This item has no description. |
![]() |
procedure AssignValue(Source: TX3DField); override; |
This item has no description. Showing description inherited from TX3DField.AssignValue. Copies the current field value. Contrary to TPersistent.Assign, this doesn't copy the rest of properties. After setting, our ValueFromIsClause is always changed to
Descendants implementors notes: In this class, implementation takes care of setting our ValueFromIsClause to if Source is <appropriate class> then begin inherited; Value := Source.value; end else AssignValueRaiseInvalidClass(Source); |
![]() |
class function X3DType: string; override; |
This item has no description. Showing description inherited from TX3DField.X3DType.
Field type in X3D, like |
![]() |
class function CreateEvent(const AParentNode: TX3DFileItem; const AName: string; const AInEvent: boolean): TX3DEvent; override; |
This item has no description. Showing description inherited from TX3DField.CreateEvent. Create TX3DEvent descendant suitable as exposed event for this field. |
Properties
![]() |
property Value: TCastleImage read FValue write SetValue; |
Current image, expressed as the TCastleImage instance. The image instance is by default owned by this object, which means that we will free it in destructor or when setting another value. Value may be IsEmpty, and then we know that there is no image recorded in this field. Value may never be |
Generated by PasDoc 0.16.0.