NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
2d_graphics_path_editor_interface.h
Go to the documentation of this file.
1 #ifndef SDK_2D_GRAPHICS_PATH_EDITOR_INTERFACE_H_
12 #define SDK_2D_GRAPHICS_PATH_EDITOR_INTERFACE_H_
13 
14 #include <base/inc/platform.h>
15 #include <base/inc/base_types.h>
19 #include "2d_graphics_consts.h"
20 #include "2d_graphics_objects.h"
21 
22 namespace sdk {
23 namespace gfx {
24 
28 {
33 } GraphicPathEditorProps;
34 
39 {
40  public:
42  virtual SDKResult SDK_CALLTYPE SetFillMode(
43  const sdk::gfx::FillModeType& fill_mode_type) throw() = 0;
45  virtual SDKResult SDK_CALLTYPE GetFillMode(
46  sdk::gfx::FillModeType& fill_mode_type) const throw() = 0;
47 
49  virtual SDKResult SDK_CALLTYPE StartFigure(const SDKPointF2D& start_point,
50  const sdk::gfx::StartFigureStyle& style) throw() = 0;
52  virtual SDKResult SDK_CALLTYPE FinishFigure(
53  const sdk::gfx::FinishFigureRule& rule) throw() = 0;
54 
55  // The following operations can be applied only to started figure
56 
58  virtual SDKResult SDK_CALLTYPE AddLine(const SDKPointF2D& point) throw() = 0;
60  virtual SDKResult SDK_CALLTYPE AddLines(const SDKPointF2D* points,
61  const SDKUInt32& points_count) throw() = 0;
62 
64  virtual SDKResult SDK_CALLTYPE AddQuadraticBezier(const SDKQBezierSegment& segment) throw() = 0;
66  virtual SDKResult SDK_CALLTYPE AddQuadraticBeziers(const SDKQBezierSegment* segments,
67  const SDKUInt32& segments_count) throw() = 0;
68 
70  virtual SDKResult SDK_CALLTYPE AddCubicBezier(const SDKCuBezierSegment& segment) throw() = 0;
72  virtual SDKResult SDK_CALLTYPE AddCubicBeziers(const SDKCuBezierSegment* segments,
73  const SDKUInt32& segments_count) throw() = 0;
74 
76  SDK_IMPLEMENT_IID(I2DGraphicsPathEditor)
77  SDK_END_INTERFACE(I2DGraphicsPathEditor)
78 };
79 SDK_DECLARE_IID(I2DGraphicsPathEditor)
80 } // namespace gfx
81 } // namespace sdk
82 
83 #endif // SDK_2D_GRAPHICS_PATH_EDITOR_INTERFACE_H_
sdk::gfx::I2DGraphicsPathEditor::AddLines
virtual SDKResult SDK_CALLTYPE AddLines(const SDKPointF2D *points, const SDKUInt32 &points_count)=0
Adds a set of connected lines to currently started figure.
base_types.h
SDK base types.
sdk::gfx::FillModeType
FillModeType
Fill mode for 2D operations.
Definition: 2d_graphics_consts.h:41
sdk::gfx::I2DGraphicsPathEditor::StartFigure
virtual SDKResult SDK_CALLTYPE StartFigure(const SDKPointF2D &start_point, const sdk::gfx::StartFigureStyle &style)=0
Starts a new figure.
properties_interface.h
Object generic properties interface.
sdk::gfx::StartFigureStyle
StartFigureStyle
New figure style (see I2DGraphicsPathEditor::StartFigure)
Definition: 2d_graphics_consts.h:50
sdk::gfx::kGraphicPathEditorProp_ApproximateCubicBeziersByLines
@ kGraphicPathEditorProp_ApproximateCubicBeziersByLines
Approximate quadratic Beziers by lines on AddCubicBezier(s) call.
Definition: 2d_graphics_path_editor_interface.h:32
sdk::gfx::I2DGraphicsPathEditor::AddLine
virtual SDKResult SDK_CALLTYPE AddLine(const SDKPointF2D &point)=0
Adds new line to figure between current and specified points.
2d_graphics_consts.h
Description of all of supported graphics constants.
SDKQBezierSegment
Quadratic Bezier curve segment.
Definition: geometry_base_types.h:1495
sdk::gfx::I2DGraphicsPathEditor::SetFillMode
virtual SDKResult SDK_CALLTYPE SetFillMode(const sdk::gfx::FillModeType &fill_mode_type)=0
Set ups the fill mode type.
SDKResult
SDKInt32 SDKResult
Type of all error or return codes which SDK functions can end with.
Definition: sdk_results.h:17
sdk::gfx::GraphicPathEditorProps
GraphicPathEditorProps
Generic graphic path editor properties.
Definition: 2d_graphics_path_editor_interface.h:27
sdk::ISDKProperties
Provides access to members that control the properties.
Definition: properties_interface.h:32
sdk::gfx::I2DGraphicsPathEditor::AddCubicBezier
virtual SDKResult SDK_CALLTYPE AddCubicBezier(const SDKCuBezierSegment &segment)=0
Adds new cubic Bezier curve segment to currently started figure.
SDKCuBezierSegment
Cubic Bezier curve segment.
Definition: geometry_base_types.h:1502
sdk::gfx::kGraphicPathEditorProp_ApproximateQuadraticBeziersByLines
@ kGraphicPathEditorProp_ApproximateQuadraticBeziersByLines
Approximate quadratic Beziers by lines on AddQuadraticBezier(s) call.
Definition: 2d_graphics_path_editor_interface.h:30
sdk_component_interface.h
Common base SDK interfaces.
SDKPointF2D
Single 2D point.
Definition: geometry_base_types.h:33
platform.h
Describes the platform constants.
sdk::gfx::I2DGraphicsPathEditor
Allows to edit the graphics path by adding geometric primitives, like line, Bezier curves,...
Definition: 2d_graphics_path_editor_interface.h:38
geometry_base_types.h
Geometry base types.
sdk::gfx::I2DGraphicsPathEditor::AddQuadraticBeziers
virtual SDKResult SDK_CALLTYPE AddQuadraticBeziers(const SDKQBezierSegment *segments, const SDKUInt32 &segments_count)=0
Adds set of quadratic Bezier curves to currently started figure.
sdk::gfx::I2DGraphicsPathEditor::AddQuadraticBezier
virtual SDKResult SDK_CALLTYPE AddQuadraticBezier(const SDKQBezierSegment &segment)=0
Adds new quadratic Bezier curve segment to currently started figure.
sdk::gfx::I2DGraphicsPathEditor::FinishFigure
virtual SDKResult SDK_CALLTYPE FinishFigure(const sdk::gfx::FinishFigureRule &rule)=0
Finishes previously started figure.
sdk::gfx::FinishFigureRule
FinishFigureRule
Figure finish rule (see I2DGraphicsPathEditor::FinishFigure)
Definition: 2d_graphics_consts.h:58
sdk::gfx::I2DGraphicsPathEditor::GetFillMode
virtual SDKResult SDK_CALLTYPE GetFillMode(sdk::gfx::FillModeType &fill_mode_type) const =0
Returns current fill mode type in use.
sdk::gfx::I2DGraphicsPathEditor::AddCubicBeziers
virtual SDKResult SDK_CALLTYPE AddCubicBeziers(const SDKCuBezierSegment *segments, const SDKUInt32 &segments_count)=0
Adds set of cubic Bezier curves to currently started figure.