NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
IVisualObject Class Referenceabstract

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.

Public Member Functions

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...
 

Detailed Description

Provides access to individual elements of a visual object including potential sprite elements and vector drawing elements (shapes)

Member Function Documentation

◆ 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]idSDL script ID.
[out]var_keyvariable length key.
Returns
kSDKResult_Succeeded
kSDKResult_NotImplemented

◆ GetSymbolGeometryType()

virtual SDKResult SDK_CALLTYPE GetSymbolGeometryType ( SymbolGeometryType &  geom_type) const
throw (
)
pure virtual

Returns the symbol geometry type.

Parameters
[out]geom_typeThe symbol geometry type.
Returns
Ok if succeeded.
Err_InvalidArg if the symbol could not be found.

◆ GetSymbolType()

virtual SDKResult SDK_CALLTYPE GetSymbolType ( SymbolType &  type) const
throw (
)
pure virtual

Returns the symbol type.

Parameters
[out]typeThe 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_idIndex of the registered palette using for drawing.
[in]targetRender target interface.
[in]transformation_matrixCustom transformation matrix.
[in]b_draw_spritesPotential 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_voChild visual object.
[in]anchorLayout anchor.
[in]x_offsetOptional X-axes offset.
[in]y_offsetOptional 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]sizeSize of visual object.
[out]originOrigin of visual object.
[in]targetRender target interface.
Returns
kSDKResult_Succeeded if OK
kSDKResult_False if the visual object is dimensionless.
kSDKResult_NotImplemented

◆ GetAnchorOffset()

virtual SDKResult SDK_CALLTYPE GetAnchorOffset ( AnchorType  anchor,
SDKPointF2D &  offset 
) const
throw (
)
pure virtual

Returns the additional anchor offset.

Parameters
[in]anchorLayout anchor.
[out]offsetAnchor 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]spritesSmart 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]spritesSmart 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: