 |
NAVTOR SDK
v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
|
|
Go to the documentation of this file. 1 #ifndef VISUAL_OBJECT_INTERFACE_H_
11 #define VISUAL_OBJECT_INTERFACE_H_
21 #include <geometry/inc/geometry/geometry2d/2d_geometry_objects.h>
31 #include <base/inc/sdk_pshpack1.h>
38 SDK_PACK(
struct SDKPosition
51 typedef enum VisualObjectFlags
53 VisualObject_CanBeSprite = 0x01,
54 VisualObject_IsSprite = 0x02,
55 VisualObject_HasPositions = 0x04,
56 VisualObject_CreatingSprite = 0x08,
57 VisualObject_CanBeCached = 0x10,
58 VisualObject_NotToScale = 0x20,
59 VisualObject_ShouldBeClipped = 0x40,
61 VisualObject_UnitsMeter = 0x80,
63 VisualObject_LayoutOwner = 0x0100,
64 VisualObject_DoNotCache = 0x0200,
72 public sdk::ISDKComponent
84 SDKUInt16&
id, SDKAny& var_key)
const throw() = 0;
110 SDKUInt16 palette_id,
111 const sdk::gfx::RenderTargetSP& target,
112 const sdk::ISDKComponentSP& geometry,
113 const SDKMatrix3X2& transformation_matrix,
114 const IDrawingContextSP& context)
throw() = 0;
125 IVisualObjectSP& child_vo,
127 float x_offset,
float y_offset)
throw() = 0;
139 const sdk::gfx::RenderTargetSP& target)
const throw() = 0;
163 ISpriteElementCollectionSP& sprites)
const throw() = 0;
173 IShapeCollection& sprites)
const throw() = 0;
175 virtual SDKResult SDK_CALLTYPE SetOffset(
177 virtual SDKResult SDK_CALLTYPE GetOffset(
180 SDKUInt16& flags)
const throw() = 0;
182 SDKUInt16 flags)
throw() = 0;
184 float& scale)
const throw() = 0;
186 RectF2D& aabb)
const throw() = 0;
199 public sdk::ISDKComponent
203 virtual SDKResult SDK_CALLTYPE
Count(SDKUInt32& count)
const throw() = 0;
215 ISpriteElementSP& sprite)
throw() = 0;
220 SDK_DECLARE_IID(ISpriteElementCollection)
222 class ISpriteElement :
225 public sdk::ISDKComponent
237 SDKUInt16&
id, SDKAny& var_key)
const throw() = 0;
246 const sdk::gfx::RenderTargetSP& target,
248 SDKRect2D& rect)
const throw() = 0;
258 const sdk::gfx::RenderTargetSP& target,
259 const sdk::geometry::GeometryPathSP& geometry,
260 const IDrawingContextSP& context,
261 SDKAny& positions)
const throw() = 0;
268 IVisualObjectSP& vo)
throw() = 0;
272 const SDKUInt16 flags)
throw() = 0;
274 SDKUInt16& flags)
throw() = 0;
280 SDK_IMPLEMENT_IID(ISpriteElement)
281 SDK_END_INTERFACE(ISpriteElement)
283 SDK_DECLARE_IID(ISpriteElement)
285 class IPositionsCollection :
288 public sdk::ISDKComponent
292 virtual SDKResult SDK_CALLTYPE
Count(SDKUInt32& count)
const throw() = 0;
297 SDKPosition& pos)
throw() = 0;
299 SDK_IMPLEMENT_IID(IPositionsCollection)
300 SDK_END_INTERFACE(IPositionsCollection)
302 SDK_DECLARE_IID(IPositionsCollection)
307 #include <base/inc/sdk_poppack.h>
309 #endif // VISUAL_OBJECT_INTERFACE_H_
SymbolGeometryType
Defines the symbol geometry type.
Definition: sdl_interface.h:71
SymbolType
Defines the symbol type.
Definition: sdl_interface.h:57
virtual SDKResult SDK_CALLTYPE GetUniqueId(SDKUInt16 &id, SDKAny &var_key) const =0
Returns the unique key composed of two parts: a two-byte SDL script ID and variable length byte strea...
Interfaces wrapper with reference count control.
Generic 2D render target (allows to render 2D images)
Describes interface for 2D geometry path, which supports the edit operations.
A 2-D point.
Definition: geometry_base_types_helpers.h:58
virtual SDKResult SDK_CALLTYPE GetSymbolGeometryType(SymbolGeometryType &geom_type) const =0
Returns the symbol geometry type.
virtual SDKResult SDK_CALLTYPE GetMetrics(SDKSizeF &size, SDKPointF2D &origin, const sdk::gfx::RenderTargetSP &target) const =0
Calculates size and origin of the visual object on the specified target.
Provides access to individual elements of a visual object including potential sprite elements and vec...
Definition: visual_object_interface.h:71
virtual SDKResult SDK_CALLTYPE GetSprite(SDKUInt32 index, ISpriteElementSP &sprite)=0
Returns the sprites element specified by index. The first sprite has index 0 and the last sprite has ...
virtual SDKResult SDK_CALLTYPE GetUniqueId(SDKUInt16 &id, SDKAny &var_key) const =0
Returns the unique key composed of two parts: a two-byte SDL script ID and variable length byte strea...
virtual SDKResult SDK_CALLTYPE Count(SDKUInt32 &count) const =0
Returns the number of potential sprites in the VO.
Wrappers and helper functions for SDKString.
SDKInt32 SDKResult
Type of all error or return codes which SDK functions can end with.
Definition: sdk_results.h:17
A 2-D Rectangle.
Definition: geometry_base_types_helpers.h:423
virtual SDKResult SDK_CALLTYPE GetAnchorOffset(AnchorType anchor, SDKPointF2D &offset) const =0
Returns the additional anchor offset.
Definition of graphic texture interfaces.
virtual SDKResult SDK_CALLTYPE GetSymbolType(SymbolType &type) const =0
Returns the symbol type.
virtual SDKResult SDK_CALLTYPE Count(SDKUInt32 &count) const =0
Returns the count of positions.
virtual SDKResult SDK_CALLTYPE GetSprites(ISpriteElementCollectionSP &sprites) const =0
Returns the sprites collection of the visual object.
Generic data stream interface.
virtual SDKResult SDK_CALLTYPE GetVisualObject(IVisualObjectSP &vo)=0
Returns the correspondent visual object.
virtual SDKResult SDK_CALLTYPE GetShapes(IShapeCollection &sprites) const =0
Returns the shape collection of the visual object.
virtual SDKResult SDK_CALLTYPE CreateTexture(const sdk::gfx::RenderTargetSP &target, SDKPointI2D &org, SDKRect2D &rect) const =0
Draws symbol to the specified texture render target.
Common base SDK interfaces.
Definition of graphic context interfaces.
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
Draws visual object on the specified target.
Single 2D point.
Definition: geometry_base_types.h:33
virtual SDKResult SDK_CALLTYPE GetPosition(SDKUInt32 index, SDKPosition &pos)=0
Returns a position specified by its index.
virtual SDKResult SDK_CALLTYPE GetPosition(const sdk::gfx::RenderTargetSP &target, const sdk::geometry::GeometryPathSP &geometry, const IDrawingContextSP &context, SDKAny &positions) const =0
Returns array of positions and angles for this sprite.
Single 2D point.
Definition: geometry_base_types.h:178
virtual SDKResult SDK_CALLTYPE SetFlags(const SDKUInt16 flags)=0
Setter and getter for visual object flags.
Symbol Definition Language (SDL) interfaces.
virtual SDKResult SDK_CALLTYPE Attach(IVisualObjectSP &child_vo, AnchorType anchor, float x_offset, float y_offset)=0
Combines the specified visual objects into the specified layout.
Describes a basic enumeration interfaces.
AnchorType
Anchor type enumeration.
Definition: sdl.h:118
virtual SDKResult SDK_CALLTYPE ClearVectorData(void)=0
Clears all cached vector data of the visual object (if any).
Provides access to potential sprite elements.
Definition: visual_object_interface.h:198
FWD_DECL_INTERFACE(ILWEParserWrapper)
Provides a wrapper around the message parser to get, add or remove the.
SizeF.
Definition: geometry_base_types.h:1111