NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
2d_graphics_path_interface.h
Go to the documentation of this file.
1 
11 #ifndef SDK_2D_GRAPHICS_PATH_INTERFACE_H_
12 #define SDK_2D_GRAPHICS_PATH_INTERFACE_H_
13 
14 #include <base/inc/platform.h>
15 #include <base/inc/base_types.h>
19 #include "2d_graphics_objects.h"
21 
22 namespace sdk {
23 namespace gfx {
24 
27 typedef enum GraphicPathProps
28 {
29 
31 } GraphicPathProps;
32 
36 {
37  public:
39  virtual SDKResult SDK_CALLTYPE GetParent(sdk::gfx::RenderTargetFactorySP& parent) const throw() = 0;
40 
43  virtual SDKResult SDK_CALLTYPE StartEdit(sdk::gfx::GraphicsPathEditorSP& editor) throw() = 0;
45  virtual SDKResult SDK_CALLTYPE FinishEdit() throw() = 0;
46 
49  virtual SDKResult SDK_CALLTYPE Transform(const SDKMatrix3X2& transformation_matrix,
50  sdk::gfx::GraphicsPathSP& transformed_path) const throw() = 0;
51 
54  virtual SDKResult SDK_CALLTYPE Combine(const sdk::gfx::GraphicsPathSP& input_path,
55  const SDKMatrix3X2& input_path_transformation_matrix,
56  const sdk::gfx::PathCombineMode& combine_mode,
57  sdk::gfx::GraphicsPathSP& combined_path) const throw() = 0;
58 
60  virtual SDKResult SDK_CALLTYPE Compare(const sdk::gfx::GraphicsPathSP& input_path,
61  const SDKMatrix3X2& input_path_transformation_matrix,
62  sdk::gfx::PathCompareResult& compare_result) const throw() = 0;
63 
66  virtual SDKResult SDK_CALLTYPE Simplify(const sdk::gfx::PathSimplifyMode& simplify_mode,
67  const SDKMatrix3X2& transformation_matrix,
68  sdk::gfx::GraphicsPathSP& simplified_path) const throw() = 0;
69 
71  virtual SDKResult SDK_CALLTYPE CalcBounds(const SDKMatrix3X2& transformation_matrix,
72  SDKRectF2D& bounds) const throw() = 0;
73 
76  virtual SDKResult SDK_CALLTYPE FastCalcBounds(
77  const SDKMatrix3X2& transformation_matrix, SDKRectF2D& bounds) const throw() = 0;
78 
80  SDK_IMPLEMENT_IID(I2DGraphicsPath)
81  SDK_END_INTERFACE(I2DGraphicsPath)
82 };
83 SDK_DECLARE_IID(I2DGraphicsPath)
84 
85 } // namespace gfx
86 } // namespace sdk
87 
88 #endif // SDK_2D_GRAPHICS_PATH_INTERFACE_H_
base_types.h
SDK base types.
sdk::gfx::PathCompareResult
PathCompareResult
Possible results of graphics path compare methods.
Definition: 2d_graphics_consts.h:76
sdk::gfx::I2DGraphicsPath::StartEdit
virtual SDKResult SDK_CALLTYPE StartEdit(sdk::gfx::GraphicsPathEditorSP &editor)=0
Returns the path editor, which allows to add geometric primitives to graphics path Some implementatio...
sdk::gfx::I2DGraphicsPath::Compare
virtual SDKResult SDK_CALLTYPE Compare(const sdk::gfx::GraphicsPathSP &input_path, const SDKMatrix3X2 &input_path_transformation_matrix, sdk::gfx::PathCompareResult &compare_result) const =0
Compares the given graphics path with specified.
sdk::gfx::I2DGraphicsPath::Transform
virtual SDKResult SDK_CALLTYPE Transform(const SDKMatrix3X2 &transformation_matrix, sdk::gfx::GraphicsPathSP &transformed_path) const =0
Transforms the graphics path by using transformation matrix New transformed path will be generated af...
sdk::gfx::I2DGraphicsPath::CalcBounds
virtual SDKResult SDK_CALLTYPE CalcBounds(const SDKMatrix3X2 &transformation_matrix, SDKRectF2D &bounds) const =0
Calculates the path bounding rectangle.
properties_interface.h
Object generic properties interface.
sdk::gfx::PathCombineMode
PathCombineMode
Possible modes for combining two paths.
Definition: 2d_graphics_consts.h:66
sdk::gfx::I2DGraphicsPath::Simplify
virtual SDKResult SDK_CALLTYPE Simplify(const sdk::gfx::PathSimplifyMode &simplify_mode, const SDKMatrix3X2 &transformation_matrix, sdk::gfx::GraphicsPathSP &simplified_path) const =0
Simplifies the given graphics path by replacing all of curves, by lines and optionally cubic Bezier c...
SDKRectF2D
2D Rectangle
Definition: geometry_base_types.h:1295
SDKResult
SDKInt32 SDKResult
Type of all error or return codes which SDK functions can end with.
Definition: sdk_results.h:17
2d_graphics_path_editor_interface.h
Allows to edit the graphics path by adding geometric primitives, like line, Bezier curves,...
sdk::ISDKProperties
Provides access to members that control the properties.
Definition: properties_interface.h:32
sdk::gfx::I2DGraphicsPath::Combine
virtual SDKResult SDK_CALLTYPE Combine(const sdk::gfx::GraphicsPathSP &input_path, const SDKMatrix3X2 &input_path_transformation_matrix, const sdk::gfx::PathCombineMode &combine_mode, sdk::gfx::GraphicsPathSP &combined_path) const =0
Combines the given graphics path with specified and generates a new path object, which contains combi...
sdk_component_interface.h
Common base SDK interfaces.
platform.h
Describes the platform constants.
matrix_base_types.h
Matrix base definitions.
sdk::gfx::GraphicPathProps
GraphicPathProps
Generic graphic path properties.
Definition: 2d_graphics_path_interface.h:27
sdk::gfx::I2DGraphicsPath::FastCalcBounds
virtual SDKResult SDK_CALLTYPE FastCalcBounds(const SDKMatrix3X2 &transformation_matrix, SDKRectF2D &bounds) const =0
Calculates the graphics path bounding rectangle Inaccurate, but fast algorithm, for exact bounds use ...
sdk::gfx::I2DGraphicsPath::GetParent
virtual SDKResult SDK_CALLTYPE GetParent(sdk::gfx::RenderTargetFactorySP &parent) const =0
Returns the parent factory instance, which created the given instance.
sdk::gfx::PathSimplifyMode
PathSimplifyMode
Possible modes for graphics path simplification.
Definition: 2d_graphics_consts.h:87
sdk::gfx::I2DGraphicsPath
Graphics path primitive, that can be drawn by the render target.
Definition: 2d_graphics_path_interface.h:35
sdk::gfx::I2DGraphicsPath::FinishEdit
virtual SDKResult SDK_CALLTYPE FinishEdit()=0
Finishes the edit process by appending new data to existing graphics path.
sdk::gfx::kGraphicPathProp_CacheInternalPathStructures
@ kGraphicPathProp_CacheInternalPathStructures
Cache the internal path structures to speed up the operations.
Definition: 2d_graphics_path_interface.h:30