Represents a position (XY) with single precision, floating point numbers.
Note
|
This class is for earlier versions of Delphi that did not define a FMX TPosition type and for use in VCL. For later versions of Delphi, TRSPosition = TPosition.
|
Namespace: RSGraphics
TPersistent
RSGraphics.TRSPosition
|
Delphi
|
type
TRSPosition = class(TPersistent)
end;
|
|
Name
|
Description
|
|
Create(TRSPoint)
|
Creates and initializes a TRSPosition instance.
Create generates a new TRSPosition instance. Create requires a default TPointF value as a DefaultValue for the position. The DefaultValue is usually (0,0), but can have other values also. If the position is the same as the default value, it is not stored in the form file.
|
Top
|
|
Name
|
Description
|
|
DefaultValue
|
Specifies the default coordinates of the current object.
Use the DefaultValue property to receive the default coordinates of a TRSPosition object.
|
|
OnChange
|
Occurs whenever a TRSPosition object changes.
Write an OnChange event handler to perform a specific action when the TRSPosition object changes.
|
|
Point
|
Specifies the coordinates of the current object as a point.
Use the Point property to specify the coordinates of a TRSPosition object as a point.
|
|
Vector
|
Specifies the coordinates of the current object as a vector.
Use the Vector property to specify the coordinates of a TRSPosition object as a vector.
Note
|
The Z coordinate is ignored
|
|
|
X
|
Specifies the horizontal coordinate of the object.
Use the X property to receive or to set the horizontal coordinate of the current TRSPosition object.
|
|
Y
|
Specifies the vertical coordinate of the object.
Use the Y property to receive or to set the vertical coordinate of the current TRSPosition object.
|
Top
|
|
Name
|
Description
|
|
Assign(TPersistent)
|
Represents method Assign(TPersistent).
|
|
Change
|
Called when the position changes.
The Change method triggers an OnChange event.
|
|
DefineProperties(TFiler)
|
Provides methods to read and write unpublished data.
DefineProperties is implemented so that the position is written as a single string in the form file, not as separate X and Y values.
DefineProperties uses the methods of the filer passed as the Filer parameter to assign methods that can load and save the Point property.
|
|
Empty
|
Returns true if the position is at the origin (0, 0)
|
|
ReadPoint(TReader)
|
Reads the coordinates of a point from the given Reader.
ReadPoint transforms the string data from the TReader given as a parameter into TPointF properties and assigns them to the Point property.
|
|
Reflect(TRSVector)
|
Returns the reflection of the current vector across a specified line.
Use the Reflect function to obtain the reflection of the current position across the perpendicular on the point given as parameter.
|
|
SetPointNoChange(TRSPoint)
|
Sets the position without triggering an OnChange event.
|
|
WritePoint(TWriter)
|
Writes the properties of the current Point into the given TWriter object.
WritePoint transforms the properties of Point into a string and writes the result in the TWriter given as a parameter.
|
Top
|