![]() |
NAVTOR SDK
v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
|
Generic 2D render target (allows to render 2D images) More...
#include <2d_render_target_interface.h>
Inherits ISDKComponent.
Public Member Functions | |
| virtual RenderTarget2DType SDK_CALLTYPE | GetType () const =0 throw () |
| Returns the Render Target type. | |
| virtual SDKResult SDK_CALLTYPE | GetParent (sdk::gfx::RenderTargetFactorySP &parent) const =0 throw () |
| Returns the parent factory instance, which created the given instance. | |
| virtual SDKResult SDK_CALLTYPE | Reinitialize ()=0 throw () |
| Forces the render target to reinitialize all of underlying components in case it's possible. Do not use this method, if you are not clearly understand the underlying mechanism. | |
| virtual SDKResult SDK_CALLTYPE | GetRenderTargetSize (SDKSize &size) const =0 throw () |
| Returns the size of the render target in real device pixels. | |
| virtual SDKResult SDK_CALLTYPE | SetDPI (const float &dpi_xy)=0 throw () |
| Sets new DPI for render target, the DPI value will used to recalculate measurement units to device pixels. Note, that DPI value for Ox and Oy always the same DPI value can't be changed, if drawing in progress, i.e. StartDraw called The new DPI value should correspond to REAL monitor DPI, otherwise the size in millimeters will not be correct on the screen. | |
| virtual SDKResult SDK_CALLTYPE | GetDPI (float &dpi_xy) const =0 throw () |
| Returns current render target DPI. | |
| virtual SDKResult SDK_CALLTYPE | SetAntiAliasingMode (const sdk::gfx::AntiAliasingMode &mode)=0 throw () |
| Sets new anti-aliasing mode. | |
| virtual SDKResult SDK_CALLTYPE | GetAntiAliasingMode (sdk::gfx::AntiAliasingMode &mode) const =0 throw () |
| Returns current anti-aliasing mode. | |
| virtual SDKResult SDK_CALLTYPE | SetMeasurementUnitsType (const sdk::gfx::MeasurementUnits &units_type)=0 throw () |
| Sets new value for measurement units type. | |
| virtual SDKResult SDK_CALLTYPE | GetMeasurementUnitsType (sdk::gfx::MeasurementUnits &units_type) const =0 throw () |
| Returns current measurement units type. | |
| virtual SDKResult SDK_CALLTYPE | CreateBitmap (const sdk::vis::scene::ITextureSP &texture, sdk::gfx::RenderTargetBitmapSP &bitmap) const =0 throw () |
| Creates new Bitmap object from ITexture object. | |
| virtual SDKResult SDK_CALLTYPE | CreateBitmapFromRawData (const SDKSize &bitmap_size, const SDKUInt32 &source_data_stride_size, const sdk::gfx::PixelFormats &source_data_pixel_format, const SDKUInt8 *source_data, sdk::gfx::RenderTargetBitmapSP &bitmap) const =0 throw () |
| Creates new Bitmap object by using raw data source Stride order should be same, as BMP has (bottom to top) | |
| virtual SDKResult SDK_CALLTYPE | CreateIndexBitmap (const SDKSize &bitmap_size, const SDKUInt32 &source_data_stride_size, const sdk::gfx::PixelFormats &source_data_pixel_format, const SDKUInt8 *source_data, const SDKUInt8 *source_palette_data, SDKUInt32 source_palette_data_size, sdk::gfx::RenderTargetBitmapSP &bitmap) const =0 throw () |
| Creates new Bitmap object by using index bitmap data source with palettes Stride order should be same, as BMP has (bottom to top) | |
| virtual SDKResult SDK_CALLTYPE | CreateSolidColorBrush (const SDKColorF &clr, sdk::gfx::RenderTargetBrushSP &brush) const =0 throw () |
| Creates a new solid color brush. | |
| virtual SDKResult SDK_CALLTYPE | CreateBitmapBrush (const sdk::gfx::RenderTargetBitmapSP &bitmap, const sdk::gfx::BitmapBrushExtendMode &ox_extend_mode, const sdk::gfx::BitmapBrushExtendMode &oy_extend_mode, sdk::gfx::RenderTargetBrushSP &brush) const =0 throw () |
| Creates a new bitmap brush. | |
| virtual SDKResult SDK_CALLTYPE | CreateStrokeStyle (const sdk::gfx::StrokeStyleOptions &style_options, const float *line_dash_pattern, const SDKUInt32 &line_dash_pattern_size, sdk::gfx::RenderTargetStrokeStyleSP &stroke_style) const =0 throw () |
| Creates a new stroke style See the DrawPath description for important notes. | |
| virtual SDKResult SDK_CALLTYPE | CreateText (const SDKString &output_text, const SDKString &font_family_name, const sdk::gfx::FontStyle &font_style, const sdk::gfx::FontWeight &font_weight, const float &font_size, sdk::gfx::RenderTargetTextSP &text) const =0 throw () |
| Creates a new text. | |
| virtual SDKResult SDK_CALLTYPE | CalcStrokedBounds (const sdk::gfx::GraphicsPathSP &path, const SDKMatrix3X2 &transformation_matrix, const float &line_width, const sdk::gfx::RenderTargetStrokeStyleSP &stroke_style, SDKRectF2D &bounds) const =0 throw () |
| Calculates the path bounding rectangle after stroke operation Current transformation matrixes stack from render target will be ignored Current measurement units and DPI will be used for calculations. | |
| virtual SDKResult SDK_CALLTYPE | GetTextPath (const SDKPointF2D &origin_point, const sdk::gfx::RenderTargetTextSP &text, sdk::gfx::GraphicsPathSP &text_path) const =0 throw () |
| Extracts the graphics path for text from text instance Current transformation matrixes stack from render target will be ignored Current measurement units and DPI will be used for path extraction. | |
| virtual SDKResult SDK_CALLTYPE | CalcTextBounds (const SDKPointF2D &origin_point, const sdk::gfx::RenderTargetTextSP &text, SDKRectF2D &bounds) const =0 throw () |
| Calculates the text bounding rectangle Current measurement units and DPI will be used for calculations. | |
| virtual SDKResult SDK_CALLTYPE | GetTextFontMetrics (const sdk::gfx::RenderTargetTextSP &text, sdk::gfx::FontMetrics &text_font_metrics) const =0 throw () |
| Returns the appropriate text font metrics for given text Current measurement units and DPI will be used for calculations. | |
| virtual SDKResult SDK_CALLTYPE | StartDraw ()=0 throw () |
| Starts draw process. This method should be called first before any call to drawing methods (All of methods below given) | |
| virtual SDKResult SDK_CALLTYPE | FinishDraw ()=0 throw () |
| Finishes the draw process. No calls to drawing methods are allowed more, till another call to StartDraw will not be performed. | |
| virtual SDKResult SDK_CALLTYPE | IsDrawInProgress (bool &is_draw_in_progress) const =0 throw () |
| Returns the flag, which shows, if drawing in progress now or not i.e. appropriate call to StartDraw was performed. | |
| virtual SDKResult SDK_CALLTYPE | FlushBuffers ()=0 throw () |
| Forces to flush the internal buffers. | |
| virtual SDKResult SDK_CALLTYPE | FillBackground (const SDKColorF &clr) const =0 throw () |
| Fills up the whole area (or clipped, if clipping is active) with color. | |
| virtual SDKResult SDK_CALLTYPE | FillPath (const sdk::gfx::GraphicsPathSP &path, const sdk::gfx::RenderTargetBrushSP &brush) const =0 throw () |
| Fills the specified graphics path by specified brush. | |
| virtual SDKResult SDK_CALLTYPE | DrawPath (const sdk::gfx::GraphicsPathSP &path, const sdk::gfx::RenderTargetBrushSP &brush, const float &line_width, const sdk::gfx::RenderTargetStrokeStyleSP &stroke_style) const =0 throw () |
| Draws the specified graphics path by using stroke style and brush The size parameters like line_width or dash_offset for stroke style will be interpreted according to current measurement units, ie. if current measurement units is pixels and dash offset value was defined equal to 5 - the five PIXELS offset will be produced. In case current measurement units is millimeters - five MILLIMETERS offset will be produced. | |
| virtual SDKResult SDK_CALLTYPE | WriteText (const SDKPointF2D &origin_point, const sdk::gfx::RenderTargetTextSP &text, const sdk::gfx::RenderTargetBrushSP &brush) const =0 throw () |
| Draws the specified text by using the origin point and foreground brush The font size is interpreted according to current measurement units The origin point is at left-top position of text. | |
| virtual SDKResult SDK_CALLTYPE | DrawBitmap (const RenderTargetBitmapSP &bitmap, const SDKRectF2D &source_bitmap_rect, const SDKRectF2D &dest_rect) const =0 throw () |
| Draws the specified bitmap by using source rectangle from bitmap and fitting it to destination rectangle. | |
| virtual SDKResult SDK_CALLTYPE | PushTransformationMatrix (const SDKMatrix3X2 &transformation_matrix)=0 throw () |
| Adds new transformation matrix to transformation matrixes stack. | |
| virtual SDKResult SDK_CALLTYPE | PopTransformationMatrix ()=0 throw () |
| Removes latest transformation matrix from matrixes stack. | |
| virtual SDKResult SDK_CALLTYPE | GetTransformationMatrix (SDKMatrix3X2 &transformation_matrix) const =0 throw () |
| Returns current resulting transformation matrix. | |
| virtual SDKResult SDK_CALLTYPE | RemoveTransformationMatrixes ()=0 throw () |
| Removes all of applied user-defined transformation matrixes. | |
| virtual SDKResult SDK_CALLTYPE | PushClippingPath (const sdk::gfx::GraphicsPathSP &clip_path)=0 throw () |
| Adds new clipping path to clipping stack. | |
| virtual SDKResult SDK_CALLTYPE | PopClippingPath ()=0 throw () |
| Removes latest clipping path from clipping stack. | |
| virtual SDKResult SDK_CALLTYPE | RemoveClippingPathes ()=0 throw () |
| Removes all of applied clipping paths from clipping stack. | |
Generic 2D render target (allows to render 2D images)