Provides access to individual elements of a visual object including potential sprite elements and vector drawing elements (shapes)
More...
#include <visual_object_interface.h>
Inherits ISDKComponent.
|
| virtual SDKResult SDK_CALLTYPE | GetUniqueId (SDKUInt16 &id, SDKAny &var_key) const =0 throw () |
| | Returns the unique key composed of two parts: a two-byte SDL script ID and variable length byte stream. More...
|
| |
| virtual SDKResult SDK_CALLTYPE | GetSymbolGeometryType (SymbolGeometryType &geom_type) const =0 throw () |
| | Returns the symbol geometry type. More...
|
| |
| virtual SDKResult SDK_CALLTYPE | GetSymbolType (SymbolType &type) const =0 throw () |
| | Returns the symbol type. More...
|
| |
| virtual SDKResult SDK_CALLTYPE | Draw (SDKUInt16 palette_id, const sdk::gfx::RenderTargetSP &target, const sdk::ISDKComponentSP &geometry, const SDKMatrix3X2 &transformation_matrix, const IDrawingContextSP &context)=0 throw () |
| | Draws visual object on the specified target. More...
|
| |
| virtual SDKResult SDK_CALLTYPE | Attach (IVisualObjectSP &child_vo, AnchorType anchor, float x_offset, float y_offset)=0 throw () |
| | Combines the specified visual objects into the specified layout. More...
|
| |
| virtual SDKResult SDK_CALLTYPE | GetMetrics (SDKSizeF &size, SDKPointF2D &origin, const sdk::gfx::RenderTargetSP &target) const =0 throw () |
| | Calculates size and origin of the visual object on the specified target. More...
|
| |
| virtual SDKResult SDK_CALLTYPE | GetAnchorOffset (AnchorType anchor, SDKPointF2D &offset) const =0 throw () |
| | Returns the additional anchor offset. More...
|
| |
| virtual SDKResult SDK_CALLTYPE | GetSprites (ISpriteElementCollectionSP &sprites) const =0 throw () |
| | Returns the sprites collection of the visual object. More...
|
| |
| virtual SDKResult SDK_CALLTYPE | GetShapes (IShapeCollection &sprites) const =0 throw () |
| | Returns the shape collection of the visual object. More...
|
| |
Provides access to individual elements of a visual object including potential sprite elements and vector drawing elements (shapes)
◆ GetUniqueId()
| virtual SDKResult SDK_CALLTYPE GetUniqueId |
( |
SDKUInt16 & |
id, |
|
|
SDKAny & |
var_key |
|
) |
| const |
| throw | ( | |
| ) | | |
|
pure virtual |
Returns the unique key composed of two parts: a two-byte SDL script ID and variable length byte stream.
- Parameters
-
| [out] | id | SDL script ID. |
| [out] | var_key | variable length key. |
- Returns
- kSDKResult_Succeeded
-
kSDKResult_NotImplemented
◆ GetSymbolGeometryType()
Returns the symbol geometry type.
- Parameters
-
| [out] | geom_type | The symbol geometry type. |
- Returns
- Ok if succeeded.
-
Err_InvalidArg if the symbol could not be found.
◆ GetSymbolType()
Returns the symbol type.
- Parameters
-
| [out] | type | The symbol type. |
- Returns
- Ok if succeeded.
-
Err_InvalidArg if the symbol could not be found.
◆ Draw()
| virtual SDKResult SDK_CALLTYPE Draw |
( |
SDKUInt16 |
palette_id, |
|
|
const sdk::gfx::RenderTargetSP & |
target, |
|
|
const sdk::ISDKComponentSP & |
geometry, |
|
|
const SDKMatrix3X2 & |
transformation_matrix, |
|
|
const IDrawingContextSP & |
context |
|
) |
| |
| throw | ( | |
| ) | | |
|
pure virtual |
Draws visual object on the specified target.
- Parameters
-
| [in] | palette_id | Index of the registered palette using for drawing. |
| [in] | target | Render target interface. |
| [in] | transformation_matrix | Custom transformation matrix. |
| [in] | b_draw_sprites | Potential sprites elements are to be drawn or not. |
- Returns
- kSDKResult_Succeeded if OK
-
kSDKResult_NotFound if there are not potential sprites
-
kSDKResult_False if there is nothing to draw
-
kSDKResult_NotImplemented
◆ Attach()
| virtual SDKResult SDK_CALLTYPE Attach |
( |
IVisualObjectSP & |
child_vo, |
|
|
AnchorType |
anchor, |
|
|
float |
x_offset, |
|
|
float |
y_offset |
|
) |
| |
| throw | ( | |
| ) | | |
|
pure virtual |
Combines the specified visual objects into the specified layout.
- Parameters
-
| [in] | child_vo | Child visual object. |
| [in] | anchor | Layout anchor. |
| [in] | x_offset | Optional X-axes offset. |
| [in] | y_offset | Optional Y-axes offset. |
- Returns
- kSDKResult_Succeeded if OK
-
kSDKResult_NotImplemented
◆ GetMetrics()
| virtual SDKResult SDK_CALLTYPE GetMetrics |
( |
SDKSizeF & |
size, |
|
|
SDKPointF2D & |
origin, |
|
|
const sdk::gfx::RenderTargetSP & |
target |
|
) |
| const |
| throw | ( | |
| ) | | |
|
pure virtual |
Calculates size and origin of the visual object on the specified target.
- Parameters
-
| [out] | size | Size of visual object. |
| [out] | origin | Origin of visual object. |
| [in] | target | Render target interface. |
- Returns
- kSDKResult_Succeeded if OK
-
kSDKResult_False if the visual object is dimensionless.
-
kSDKResult_NotImplemented
◆ GetAnchorOffset()
Returns the additional anchor offset.
- Parameters
-
| [in] | anchor | Layout anchor. |
| [out] | offset | Anchor offset. |
- Returns
- kSDKResult_Succeeded if OK
-
kSDKResult_False if the visual object is dimensionless.
-
kSDKResult_NotImplemented
◆ GetSprites()
| virtual SDKResult SDK_CALLTYPE GetSprites |
( |
ISpriteElementCollectionSP & |
sprites | ) |
const |
| throw | ( | |
| ) | | |
|
pure virtual |
Returns the sprites collection of the visual object.
- Parameters
-
| [out] | sprites | Smart pointer to the ISpriteCollection interface associated with the visual object. |
- Returns
- kSDKResult_Succeeded if the visual object is actually a potential sprite collection and has no shapes
-
kSDKResult_NotFound if there are not potential sprites
-
kSDKResult_True if the visual object has potential sprites but also has shapes
-
kSDKResult_False if there are neither sprites nor shapes
-
kSDKResult_NotImplemented
◆ GetShapes()
| virtual SDKResult SDK_CALLTYPE GetShapes |
( |
IShapeCollection & |
sprites | ) |
const |
| throw | ( | |
| ) | | |
|
pure virtual |
Returns the shape collection of the visual object.
- Parameters
-
| [out] | sprites | Smart pointer to the IShapeCollection interface associated with the visual object. |
- Returns
- kSDKResult_Succeeded if there are shapes
-
kSDKResult_NotFound if there are not shapes
-
kSDKResult_NotImplemented
The documentation for this class was generated from the following file: