Jump to content

Template:GraphObjectProperties: Difference between revisions

From BCI2000 Wiki
Mellinger (talk | contribs)
Mellinger (talk | contribs)
No edit summary
Line 4: Line 4:
===bool Visible (r)===
===bool Visible (r)===
''True'' if the object is visible, ''false'' if it is hidden. Use the ''Hide()'' and ''Show()'' methods to set this property.
''True'' if the object is visible, ''false'' if it is hidden. Use the ''Hide()'' and ''Show()'' methods to set this property.
===float ZOrder (rw)===
Determines the order in which GraphObjects are drawn. GraphObjects with smaller values of ZOrder are drawn on top of those with larger values, hiding these.


===enum AspectRatioMode (rw)===
===enum AspectRatioMode (rw)===

Revision as of 13:32, 27 June 2011

GraphDisplay Display (r)

The GraphDisplay object that was specified when the object was created.

bool Visible (r)

True if the object is visible, false if it is hidden. Use the Hide() and Show() methods to set this property.

float ZOrder (rw)

Determines the order in which GraphObjects are drawn. GraphObjects with smaller values of ZOrder are drawn on top of those with larger values, hiding these.

enum AspectRatioMode (rw)

One of the following options:

AdjustNone
No adjustment is made.
AdjustWidth
The object's width is adapted to its contents, while keeping its height constant.
AdjustHeight
The object's height is adapted to its contents, keeping its width constant.
AdjustBoth
Both the object's height and width are adjusted to its content.

The exact behavior of aspect ratio adjustment depends on the object's type. E.g., for bitmap images, AdjustBoth will size the image such that one image pixel corresponds to one screen pixel; AdjustHeight and AdjustWidth will adjust such that the original aspect ratio is preserved.

GUI::Rect DisplayRect (rw)

The bounding rectangle of the space that is occupied by the object. This is given in coordinates relative to the size of the object's GraphDisplay; there, the upper left corner corresponds to (0,0), the lower right corner to (1,1). When a GraphObject is created, its display rectangle is empty.