IRenderer



Describes renderer which is used for all drawing operations.

Important notice: shader programs are optional feature and it depends on renderer if it is available or not. It means you can use them in programs you designed for using specific renderer which supports shaders. But when you create controls you alwas should check renderer technology to use proper shader language and after creation shader program always check if it was really created or not. If not, perform drawing by operating texture data directly using ITexture::Lock(). Remember, your controls shouldn't depend on optional features. Optional features can only be used to speed up drawing if possible. You can find more information about shader programs at the bottom of this page, right after IRenderer interface description.

In version 3.0.0 all primitive drawing methods have received overloaded versions which have added possibility of binary masking. It means you may specify 32-bit binary mask where each bit indicates whether pixel should be drawn(value 1) or omitted(value 0). Lines have only 1D binary mask. Other primitives have 2D binary masks which means you may specify two masks - for X and for Y directions. The starting point of mask is start point of line, left-top corner of primitive rectangle, or left-top corner of bounding rectangle(for triangles). The binary mask coordinates then calculated like this: for example, we have line from { 10, 10 } point to { 100, 10 } point. In this case a coordinate in binary mask space will be (X - 10) % 32, where X is coordinate on a line, 10 is a start coordinate, and 32 is count of bits in binary mask. The similar algorithm is used for two dimentional masks as well. Also, 2D binary masks have option how binary mask coordinates will be calculated. Either primitive or form coordinates can be used for calculation of binary mask coordinates. When primitive coordinates are used, they are applied before any transformations. When form ones are used, there is no any transformations at all. With binary masks you can easily achieve effects like on the following image.

Binary masks(bitmasks)

In version 7.0.0 all primitive drawing methods have got variants with mask as a last argument. This mask's texture alpha channel is used to specify opacity of a drawn pixel. When its value is 0, a pixel wont be drawn at all. When its value is 127, a pixel will be drawn half transparent. When its value is 255, a pixel will be drawn as usually. It you specify nullptr in the mask argument, all methods will draw pimitives as usually without any mask applied.

You can find more information in comments below.

class IRenderer
{
public:
    using BlockColors = Color[plOutside + 1]; // Array of colors for each parts of BLOCK 

    enum BLUR_TYPE // Blur type 
    {
        btGaussian, // Use gauss function  
        btAverage // Use average value(visually it more thick than gaussian one)  
    };

    enum TECHNOLOGY_TYPE // Renderer technology 
    {
        ttNull, // Render nowhere 
        ttOpenGL, // OpenGL
        ttDirectX, // DirectX
        ttGDI, // GDI
        ttGDIPlus, // GDI+
        ttOther // Another 
    };

    struct CUBIC_BEZIER_SPLINE // Describe cubic bezier spline 
    {
        PointF P1; // Start point 
        PointF C1; // First control point 
        PointF C2; // Second control point 
        PointF P2; // End point 
    };
public:
    virtual IWindow *getWindow() = 0; // Return associated window 
    virtual ITexture *getRenderTarget() = 0; // Return current rendering target. If nullptr, draw on window 
    virtual Rect getViewport() = 0; // Return current viewport(in render target or window client area coordinates) 
    virtual Color getClearColor() = 0; // Return color to be used to clear rendering target 
    virtual TECHNOLOGY_TYPE getTechnology() const = 0; // Return used technology for drawing 
    virtual Point getMinVersion() const = 0; // Return minimum required version for used rendering technology 
    virtual Point getVersion() = 0; // Return detected version of system's rendering technology 
    // Since 1.3.0    virtual IShaderProgram *getShaderProgram() = 0; // Return current active shader program. Empty means default one is in use 

    virtual bool setWindow(IWindow *value) = 0; // Assign window and initialize. Clean up if nullptr 
    virtual bool setRenderTarget(ITexture *value) = 0; // Set rendering target. If nullptr, draw on window. If not nullptr draw on rendering target 
    virtual void setClearColor(const Color &value) = 0; // Set render target clearing color 
    // Since 1.3.0 
    virtual bool setShaderProgram(IShaderProgram *value) = 0; // Activate new shader program. Return false if the same program is already active or another error happend 
    // Since 6.0.0 
    virtual INativeGraphics *getNativeGraphics() = 0; // Return interface which should be converted to the one corresponding to the current renderer and be used to access native graphic functions. Could return nullptr if this feature is not supported 

    virtual IPlatformFont *FontCreate(const String &fontname, const int height, const FONT_WEIGHT weight, const bool italic, const bool underline, const bool strikeout, const bool monospace) = 0; // Create platform font with specified parameters. Create only if not exists with same parameters 
    virtual ITexture *TextureCreate(const int width, const int height, const AnsiString &format) = 0; // Create texture. Windows OpenGL renderer supports "RGBA" and "R" as texture format 
    virtual ITexture *TextureCreate(const Bitmap &data) = 0; // Create texture by image data, if corresponding to data texture already exists, return existing one 
    // Since 1.3.0 
    virtual IShaderProgram *ShaderProgramCreate(const AnsiString &vertex, const AnsiString &fragment, const bool utils) = 0; // Create shader program from specified source codes of vertex and fragment shaders, optionally includes utils library. May return nullptr not only when error happend but also if shader programs are not supported. For more details see comment below 
    virtual IShaderProgram *ShaderProgramCreate(const AnsiString &fragment) = 0; // Create shader program from source code of predefened format. May return nullptr. For more details please see comments below 

    virtual void Release() = 0; // Destroy instance 
    virtual bool DrawBegin(Rect &viewport) = 0; // Prepare for drawing. Viewport may be changed(if client area of window was changed, it will be set to new client area). Should always be called before start drawing. It is done automatically in default form implementation 
    virtual bool DrawEnd() = 0; // Clean up after drawing. Should be called after all drawings. It is called automatically by default form implementation 
    virtual bool Present() = 0; // Draw to screen. Render target should be set to nullptr 
    virtual IRenderer *CreateInstance() = 0; // Create same class object(without initializing, with same constructor parameters - double buffering and multisampling if supported) 

    virtual bool PushMask(ITexture *mask, const Matrix &matrix) = 0; // Add mask in list. The matrix should be relative to prev mask. Texture is unchanged. Alpha channel of masks is used for clipping 
    virtual void PopMask() = 0; // Delete last added masking texture. Texture is unchanged 

    // Since 6.0.0 
    virtual void RestoreState() = 0; // Restore state(VAO, VBO, Program, Program subroutines, ...) 

    // Since 7.0.0 
    virtual bool BeginSplineLimitation( // Start limiting primitive drawing to the area between specified(by it's control points) cubic bezier splines. Return false if not supported or invalid arguments are used. Only pixels lying between splines will be drawn 
        const CUBIC_BEZIER_SPLINE &spline1, // First spline 
        const CUBIC_BEZIER_SPLINE &spline2, // Second spline 
        const bool apply_to_y_direction) = 0; // Whether the limitation will be applied in Y or X direction 
    virtual bool EndSplineLimitation() = 0; // Remove limitation by splines set by method above 

    // Fill entire area of current render target 
    virtual void Clear() = 0; // Clear with current clear color. Used in form rendering 
    virtual void Clear(const Color &color) = 0; // Clear with specified color. Clear color is unchanged after it. Use it for texture clean(when render target is texture) 

    virtual void Line( // Draw line 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &color, // Color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Line( // Draw line with transformation 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &color, // Color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Line( // Draw line with gradiental filling 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &c1, // Start point color 
        const Color &c2, // End point color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Line( // Draw line with gradiental filling and transformation 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &c1, // Start point color 
        const Color &c2, // End point color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    // Since 3.0.0 
    virtual void Line( // Draw masked line 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &color, // Color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask) = 0; // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from start point. Uses distance from p1 to calculate current bit 
    virtual void Line( // Draw masked line with transformation 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &color, // Color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask) = 0; // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from start point. Uses distance from p1 to calculate current bit 
    virtual void Line( // Draw masked line with gradiental filling 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &c1, // Start point color 
        const Color &c2, // End point color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask) = 0; // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from start point. Uses distance from p1 to calculate current bit 
    virtual void Line( // Draw masked line with gradiental filling and transformation 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &c1, // Start point color 
        const Color &c2, // End point color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask) = 0; // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from start point. Uses distance from p1 to calculate current bit 
    // Since 7.0.0 
    virtual void Line( // Draw line 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &color, // Color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Line( // Draw line with transformation 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &color, // Color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Line( // Draw line with gradiental filling 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &c1, // Start point color 
        const Color &c2, // End point color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Line( // Draw line with gradiental filling and transformation 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &c1, // Start point color 
        const Color &c2, // End point color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Line( // Draw masked line 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &color, // Color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask, // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from start point. Uses distance from p1 to calculate current bit 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Line( // Draw masked line with transformation 
        const PointF &p1, // Start point 
        const PointF&p2, // End point 
        const Color &color, // Color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask, // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from start point. Uses distance from p1 to calculate current bit 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Line( // Draw masked line with gradiental filling 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &c1, // Start point color 
        const Color &c2, // End point color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask, // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from start point. Uses distance from p1 to calculate current bit 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Line( // Draw masked line with gradiental filling and transformation 
        const PointF &p1, // Start point 
        const PointF &p2, // End point 
        const Color &c1, // Start point color 
        const Color &c2, // End point color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask, // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from start point. Uses distance from p1 to calculate current bit 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    virtual void Lines( // Draw lines 
        const std::vector<PointF> &points, // Line points 
        const Color &color, // Color of all lines 
        const bool loop, // Whether to draw line from last to first one(close the shape) 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Lines( // Draw lines with transformation 
        const std::vector<PointF> &points, // Line points 
        const Color &color, // Color of all lines 
        const bool loop, // Whether to draw line from last to first one(close the shape) 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    // Since 3.0.0 
    virtual void Lines( // Draw masked lines 
        const std::vector<PointF> &points, // Line points 
        const Color &color, // Color of all lines 
        const bool loop, // Whether to draw line from last to first one(close the shape) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask) = 0; // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from first point. Uses distance from first point to calculate current bit 
    virtual void Lines( // Draw masked lines with transformation 
        const std::vector<PointF> &points, // Line points 
        const Color &color, // Color of all lines 
        const bool loop, // Whether to draw line from last to first one(close the shape) 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask) = 0; // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from first point. Uses distance from first point to calculate current bit 
    // Since 7.0.0 
    virtual void Lines( // Draw lines 
        const std::vector<PointF> &points, // Line points 
        const Color &color, // Color of all lines 
        const bool loop, // Whether to draw line from last to first one(close the shape) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Lines( // Draw lines with transformation 
        const std::vector<PointF> &points, // Line points 
        const Color &color, // Color of all lines 
        const bool loop, // Whether to draw line from last to first one(close the shape) 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Lines( // Draw masked lines 
        const std::vector<PointF> &points, // Line points 
        const Color &color, // Color of all lines 
        const bool loop, // Whether to draw line from last to first one(close the shape) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask, // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from first point. Uses distance from first point to calculate current bit 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Lines( // Draw masked lines with transformation 
        const std::vector<PointF> &points, // Line points 
        const Color &color, // Color of all lines 
        const bool loop, // Whether to draw line from last to first one(close the shape) 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask, // 32-bit binary mask where 1 - draw, 0 - not draw. Calculated starting from first point. Uses distance from first point to calculate current bit 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    virtual void Triangle( // Draw solid triangle 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &color, // Triangle color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Triangle( // Draw solid triangle with transformation 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &color, // Triangle color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Triangle( // Draw gradientally filled triangle 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &c1, // 1st vertex color 
        const Color &c2, // 2nd vertex color 
        const Color &c3, // 3rd vertex color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Triangle( // Draw gradientally filled triangle with transformation 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &c1, // 1st vertex color 
        const Color &c2, // 2nd vertex color 
        const Color &c3, // 3rd vertex color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    // Since 3.0.0 
    virtual void Triangle( // Draw masked solid triangle 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &color, // Triangle color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Triangle( // Draw masked solid triangle with transformation 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &color, // Triangle color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Triangle( // Draw masked gradientally filled triangle 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &c1, // 1st vertex color 
        const Color &c2, // 2nd vertex color 
        const Color &c3, // 3rd vertex color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Triangle( // Draw masked gradientally filled triangle with transformation 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &c1, // 1st vertex color 
        const Color &c2, // 2nd vertex color 
        const Color &c3, // 3rd vertex color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    // Since 7.0.0 
    virtual void Triangle( // Draw solid triangle 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &color, // Triangle color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Triangle( // Draw solid triangle with transformation 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &color, // Triangle color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Triangle( // Draw gradientally filled triangle 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &c1, // 1st vertex color 
        const Color &c2, // 2nd vertex color 
        const Color &c3, // 3rd vertex color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Triangle( // Draw gradientally filled triangle with transformation 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &c1, // 1st vertex color 
        const Color &c2, // 2nd vertex color 
        const Color &c3, // 3rd vertex color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Triangle( // Draw masked solid triangle 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &color, // Triangle color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Triangle( // Draw masked solid triangle with transformation 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &color, // Triangle color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Triangle( // Draw masked gradientally filled triangle 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &c1, // 1st vertex color 
        const Color &c2, // 2nd vertex color 
        const Color &c3, // 3rd vertex color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Triangle( // Draw masked gradientally filled triangle with transformation 
        const PointF &p1, // 1st vertex 
        const PointF &p2, // 2nd vertex 
        const PointF &p3, // 3rd vertex 
        const Color &c1, // 1st vertex color 
        const Color &c2, // 2nd vertex color 
        const Color &c3, // 3rd vertex color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    virtual void Rectangle( // Draw solid rectangle 
        const RectF &rect, // Rectangle 
        const Color &color, // Rectangle color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Rectangle( // Draw solid rectangle with transformation 
        const RectF &rect, // Rectangle 
        const Color &color, // Rectangle color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Rectangle( // Draw gradientally filled rectangle 
        const RectF &rect, // Rectangle 
        const Color &c1, // Left-top vertex color 
        const Color &c2, // Right-top vertex color 
        const Color &c3, // Right-bottom vertex color 
        const Color &c4, // Left-bottom vertex color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Rectangle( // Draw gradientally filled rectangle with transformation 
        const RectF &rect, // Rectangle 
        const Color &c1, // Left-top vertex color 
        const Color &c2, // Right-top vertex color 
        const Color &c3, // Right-bottom vertex color 
        const Color &c4, // Left-bottom vertex color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    // Since 3.0.0 
    virtual void Rectangle( // Draw masked solid rectangle 
        const RectF &rect, // Rectangle 
        const Color &color, // Rectangle color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Rectangle( // Draw masked solid rectangle with transformation 
        const RectF &rect, // Rectangle 
        const Color &color, // Rectangle color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Rectangle( // Draw masked gradientally filled rectangle 
        const RectF &rect, // Rectangle 
        const Color &c1, // Left-top vertex color 
        const Color &c2, // Right-top vertex color 
        const Color &c3, // Right-bottom vertex color 
        const Color &c4, // Left-bottom vertex color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Rectangle( // Draw masked gradientally filled rectangle with transformation 
        const RectF &rect, // Rectangle 
        const Color &c1, // Left-top vertex color 
        const Color &c2, // Right-top vertex color 
        const Color &c3, // Right-bottom vertex color 
        const Color &c4, // Left-bottom vertex color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    // Since 7.0.0 
    virtual void Rectangle( // Draw solid rectangle 
        const RectF &rect, // Rectangle 
        const Color &color, // Rectangle color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Rectangle( // Draw solid rectangle with transformation 
        const RectF &rect, // Rectangle 
        const Color &color, // Rectangle color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Rectangle( // Draw gradientally filled rectangle 
        const RectF &rect, // Rectangle 
        const Color &c1, // Left-top vertex color 
        const Color &c2, // Right-top vertex color 
        const Color &c3, // Right-bottom vertex color 
        const Color &c4, // Left-bottom vertex color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Rectangle( // Draw gradientally filled rectangle with transformation 
        const RectF &rect, // Rectangle 
        const Color &c1, // Left-top vertex color 
        const Color &c2, // Right-top vertex color 
        const Color &c3, // Right-bottom vertex color 
        const Color &c4, // Left-bottom vertex color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Rectangle( // Draw masked solid rectangle 
        const RectF &rect, // Rectangle 
        const Color &color, // Rectangle color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Rectangle( // Draw masked solid rectangle with transformation 
        const RectF &rect, // Rectangle 
        const Color &color, // Rectangle color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Rectangle( // Draw masked gradientally filled rectangle 
        const RectF &rect, // Rectangle 
        const Color &c1, // Left-top vertex color 
        const Color &c2, // Right-top vertex color 
        const Color &c3, // Right-bottom vertex color 
        const Color &c4, // Left-bottom vertex color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Rectangle( // Draw masked gradientally filled rectangle with transformation 
        const RectF &rect, // Rectangle 
        const Color &c1, // Left-top vertex color 
        const Color &c2, // Right-top vertex color 
        const Color &c3, // Right-bottom vertex color 
        const Color &c4, // Left-bottom vertex color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    virtual void Gradient( // Draw gradient 
        const RectF &rect, // Rectangle 
        nitisa::Gradient &g, // Gradient 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Gradient( // Draw gradient with transformation 
        const RectF &rect, // Rectangle 
        nitisa::Gradient &g, // Gradient 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    // Since 3.0.0 
    virtual void Gradient( // Draw masked gradient 
        const RectF &rect, // Rectangle 
        nitisa::Gradient &g, // Gradient 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Gradient( // Draw masked gradient with transformation 
        const RectF &rect, // Rectangle 
        nitisa::Gradient &g, // Gradient 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    // Since 7.0.0 
    virtual void Gradient( // Draw gradient 
        const RectF &rect, // Rectangle 
        nitisa::Gradient &g, // Gradient 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Gradient( // Draw gradient with transformation 
        const RectF &rect, // Rectangle 
        nitisa::Gradient &g, // Gradient 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Gradient( // Draw masked gradient 
        const RectF &rect, // Rectangle 
        nitisa::Gradient &g, // Gradient 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Gradient( // Draw masked gradient with transformation 
        const RectF &rect, // Rectangle 
        nitisa::Gradient &g, // Gradient 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    virtual void Image( // Draw image at specified position 
        ITexture *image, // Image 
        const PointF &p, // Position where to draw 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Image( // Draw image with transformation 
        ITexture *image, // Image 
        const Matrix &m, // Transformation matrix 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Image( // Draw image part at specified position 
        ITexture *image, // Image 
        const RectF &part, // Part to be drawn 
        const PointF &p, // Position where to draw 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Image( // Draw image part with transformation 
        ITexture *image, // Image 
        const RectF &part, // Part to be drawn 
        const Matrix &m, // Transformation matrix 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    // Since 3.0.0 
    virtual void Image( // Draw masked image at specified position 
        ITexture *image, // Image 
        const PointF &p, // Position where to draw 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Image( // Draw masked image with transformation 
        ITexture *image, // Image 
        const Matrix &m, // Transformation matrix 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Image( // Draw masked image part at specified position 
        ITexture *image, // Image 
        const RectF &part, // Part to be drawn 
        const PointF &p, // Position where to draw 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Image( // Draw masked image part with transformation 
        ITexture *image, // Image 
        const RectF &part, // Part to be drawn 
        const Matrix &m, // Transformation matrix 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    // Since 7.0.0 
    virtual void Image( // Draw image at specified position 
        ITexture *image, // Image 
        const PointF &p, // Position where to draw 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Image( // Draw image with transformation 
        ITexture *image, // Image 
        const Matrix &m, // Transformation matrix 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Image( // Draw image part at specified position 
        ITexture *image, // Image 
        const RectF &part, // Part to be drawn 
        const PointF &p, // Position where to draw 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Image( // Draw image part with transformation 
        ITexture *image, // Image 
        const RectF &part, // Part to be drawn 
        const Matrix &m, // Transformation matrix 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Image( // Draw masked image at specified position 
        ITexture *image, // Image 
        const PointF &p, // Position where to draw 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Image( // Draw masked image with transformation 
        ITexture *image, // Image 
        const Matrix &m, // Transformation matrix 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Image( // Draw masked image part at specified position 
        ITexture *image, // Image 
        const RectF &part, // Part to be drawn 
        const PointF &p, // Position where to draw 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Image( // Draw masked image part with transformation 
        ITexture *image, // Image 
        const RectF &part, // Part to be drawn 
        const Matrix &m, // Transformation matrix 
        const float transparency, // Transparency(0..1) 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    virtual void Block( // Draw block 
        const RectF &block, // Block rectangle 
        const RectF &border, // Border widthes 
        const RectF &radius, // Corner radiuses 
        const BlockColors &colors) = 0; // Part colors(left border, top border, right border, bottom border, internal area, external area) 
    virtual void Block( // Draw block part visible through specified rectangle 
        const RectF &rect, // Rectangle to be drawn 
        const RectF &block, // Block rectangle 
        const RectF &border, // Border widthes 
        const RectF &radius, // Corner radiuses 
        const BlockColors &colors) = 0; // Part colors(left border, top border, right border, bottom border, internal area, external area) 
    // Since 3.0.0 
    virtual void Block( // Draw masked block 
        const RectF &block, // Block rectangle 
        const RectF &border, // Border widthes 
        const RectF &radius, // Corner radiuses 
        const BlockColors &colors, // Part colors(left border, top border, right border, bottom border, internal area, external area) 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Block( // Draw masked block part visible through specified rectangle 
        const RectF &rect, // Rectangle to be drawn 
        const RectF &block, // Block rectangle 
        const RectF &border, // Border widthes 
        const RectF &radius, // Corner radiuses 
        const BlockColors &colors, // Part colors(left border, top border, right border, bottom border, internal area, external area) 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    // Since 7.0.0 
    virtual void Block( // Draw block 
        const RectF &block, // Block rectangle 
        const RectF &border, // Border widthes 
        const RectF &radius, // Corner radiuses 
        const BlockColors &colors, // Part colors(left border, top border, right border, bottom border, internal area, external area) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Block( // Draw block part visible through specified rectangle 
        const RectF &rect, // Rectangle to be drawn 
        const RectF &block, // Block rectangle 
        const RectF &border, // Border widthes 
        const RectF &radius, // Corner radiuses 
        const BlockColors &colors, // Part colors(left border, top border, right border, bottom border, internal area, external area) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Block( // Draw masked block 
        const RectF &block, // Block rectangle 
        const RectF &border, // Border widthes 
        const RectF &radius, // Corner radiuses 
        const BlockColors &colors, // Part colors(left border, top border, right border, bottom border, internal area, external area) 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Block( // Draw masked block part visible through specified rectangle 
        const RectF &rect, // Rectangle to be drawn 
        const RectF &block, // Block rectangle 
        const RectF &border, // Border widthes 
        const Rect &radius, // Corner radiuses 
        const BlockColors &colors, // Part colors(left border, top border, right border, bottom border, internal area, external area) 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    virtual void Text( // Draw text at specified position 
        const String &text, // Text 
        IPlatformFont *font, // Font 
        const float distance, // Additional distance between characters 
        const Color &color, // Color 
        const PointF &p, // Position 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Text( // Draw text with transformation 
        const String &text, // Text 
        IPlatformFont *font, // Font 
        const float distance, // Additional distance between characters 
        const Color &color, // Color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    // Since 3.0.0 
    virtual void Text( // Draw masked text at specified position 
        const String &text, // Text 
        IPlatformFont *font, // Font 
        const float distance, // Additional distance between characters 
        const Color &color, // Color 
        const PointF &p, // Position 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Text( // Draw masked text with transformation 
        const String &text, // Text 
        IPlatformFont *font, // Font 
        const float distance, // Additional distance between characters 
        const Color &color, // Color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    // Since 7.0.0 
    virtual void Text( // Draw text at specified position 
        const String &text, // Text 
        IPlatformFont *font, // Font 
        const float distance, // Additional distance between characters 
        const Color &color, // Color 
        const PointF &p, // Position 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Text( // Draw text with transformation 
        const String &text, // Text 
        IPlatformFont *font, // Font 
        const float distance, // Additional distance between characters 
        const Color &color, // Color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Text( // Draw masked text at specified position 
        const String &text, // Text 
        IPlatformFont *font, // Font 
        const float distance, // Additional distance between characters 
        const Color &color, // Color 
        const PointF &p, // Position 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Text( // Draw masked text with transformation 
        const String &text, // Text 
        IPlatformFont *font, // Font 
        const float distance, // Additional distance between characters 
        const Color &color, // Color 
        const Matrix &m, // Transformation matrix 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    virtual void Blur( // Add blur to image 
        ITexture *image, // Image to be blured 
        const int radius, // Blur radius(>= 1) 
        const BLUR_TYPE type) = 0; // Blur type 
    virtual void Blur( // Blur image without modifying originl one. Store result in target 
        ITexture *target, // Storage for result image 
        ITexture *source, // Image which blured representation is required 
        const int radius, // Blur radius(>= 1) 
        const BLUR_TYPE type) = 0; // Blur type 
    // Since 3.0.0 
    virtual void Blur( // Add masked blur to image 
        ITexture *image, // Image to be blured 
        const int radius, // Blur radius(>= 1) 
        const BLUR_TYPE type, // Blur type 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Blur( // Blur image without modifying originl one and using binary mask on target. Store result in target 
        ITexture *target, // Storage for result image 
        ITexture *source, // Image which blured representation is required 
        const int radius, // Blur radius(>= 1) 
        const BLUR_TYPE type, // Blur type 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    // Since 7.0.0 
    virtual void Blur( // Add blur to image 
        ITexture *image, // Image to be blured 
        const int radius, // Blur radius(>= 1) 
        const BLUR_TYPE type, // Blur type 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Blur( // Blur image without modifying originl one. Store result in target 
        ITexture *target, // Storage for result image 
        ITexture *source, // Image which blured representation is required 
        const int radius, // Blur radius(>= 1) 
        const BLUR_TYPE type, // Blur type 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Blur( // Add masked blur to image 
        ITexture *image, // Image to be blured 
        const int radius, // Blur radius(>= 1) 
        const BLUR_TYPE type, // Blur type 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Blur( // Blur image without modifying originl one and using binary mask on target. Store result in target 
        ITexture *target, // Storage for result image 
        ITexture *source, // Image which blured representation is required 
        const int radius, // Blur radius(>= 1) 
        const BLUR_TYPE type, // Blur type 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    // Since 7.0.0 
    virtual void Polygon( // Draw polygon 
        const std::vector<PointF> &points, // Polygon points. Should be at least 3 points and polygon should be convex. 3000 points maximum 
        const Color &color, // Polygon color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Polygon( // Draw transformed polygon 
        const std::vector<PointF> &points, // Polygon points. Should be at least 3 points and polygon should be convex. 3000 points maximum 
        const Matrix &m, // Transformation matrix 
        const Color &color, // Polygon color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Polygon( // Draw polygon using binary mask 
        const std::vector<PointF> &points, // Polygon points. Should be at least 3 points and polygon should be convex. 3000 points maximum 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Polygon( // Draw transformed polygon using binary mask 
        const std::vector<PointF> &points, // Polygon points. Should be at least 3 points and polygon should be convex. 3000 points maximum 
        const Matrix &m, // Transformation matrix 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Polygon( // Draw polygon 
        const std::vector<PointF> &points, // Polygon points. Should be at least 3 points and polygon should be convex. 3000 points maximum 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Polygon( // Draw transformed polygon 
        const std::vector<PointF> &points, // Polygon points. Should be at least 3 points and polygon should be convex. 3000 points maximum 
        const Matrix &m, // Transformation matrix 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Polygon( // Draw polygon using binary mask 
        const std::vector<PointF> &points, // Polygon points. Should be at least 3 points and polygon should be convex. 3000 points maximum 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Polygon( // Draw transformed polygon using binary mask 
        const std::vector<PointF> &points, // Polygon points. Should be at least 3 points and polygon should be convex. 3000 points maximum 
        const Matrix &m, // Transformation matrix 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 

    // Since 7.0.0 
    virtual void Polygons( // Draw polygon 
        const std::vector<std::vector<PointF>> &polygons, // Array of polygons. Each polygon should have from 3 to 3000 points 
        const Color &color, // Polygon color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Polygons( // Draw transformed polygon 
        const std::vector<std::vector<PointF>> &polygons, // Array of polygons. Each polygon should have from 3 to 3000 points 
        const Matrix &m, // Transformation matrix 
        const Color &color, // Polygon color 
        const BLOCK *block) = 0; // Clipping block. Use nullptr if clipping is not required 
    virtual void Polygons( // Draw polygon using binary mask 
        const std::vector<std::vector<PointF>> &polygons, // Array of polygons. Each polygon should have from 3 to 3000 points 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Polygon( // Draw transformed polygon using binary mask 
        const std::vector<std::vector<PointF>> &polygons, // Array of polygons. Each polygon should have from 3 to 3000 points 
        const Matrix &m, // Transformation matrix 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form) = 0; // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
    virtual void Polygons( // Draw polygon 
        const std::vector<std::vector<PointF>> &polygons, // Array of polygons. Each polygon should have from 3 to 3000 points 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Polygons( // Draw transformed polygon 
        const std::vector<std::vector<PointF>> &polygons, // Array of polygons. Each polygon should have from 3 to 3000 points 
        const Matrix &m, // Transformation matrix 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Polygons( // Draw polygon using binary mask 
        const std::vector<std::vector<PointF>> &polygons, // Array of polygons. Each polygon should have from 3 to 3000 points 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
    virtual void Polygons( // Draw transformed polygon using binary mask 
        const std::vector<std::vector<PointF>> &polygons, // Array of polygons. Each polygon should have from 3 to 3000 points 
        const Matrix &m, // Transformation matrix 
        const Color &color, // Polygon color 
        const BLOCK *block, // Clipping block. Use nullptr if clipping is not required 
        const unsigned int bitmask_x, // 32-bit binary mask for X direction where 1 - draw, 0 - not draw 
        const unsigned int bitmask_y, // 32-bit binary mask for Y direction where 1 - draw, 0 - not draw 
        const bool bitmask_form, // How to start calculate coordinates for binary masking. If it is true, the form coordinates are used. If it is false, the primitive coordinates are used(without transformations) 
        ITexture *mask) = 0; // Mask to be applied when drawing. Only alpha channel is used 
};

More about shader programs

There are two methods for creation of shader programs in renderer. The first one require to specify both vertex and fragment shader source code and the second one requires only a fragment shader source code. All source codes should be in language particular renderer uses. GLSL for renderer which uses OpenGL or HLSL for renderer which uses DirectX and so on.

The first method allow you to create completely custom shader programs and is also allow to include unility functions renderer uses. The second method will use all the renderer default functionality except for pixel color calculation which should be impemented in your source code.

For information about available utility functions and reserved variables as well as color calculation function please see particular renderer implementation.

Limiting drawing by splines

The feature of limitation drawing operations by two splines was added in version 7.0.0. It is represented in the interface by two methods: first one is BeginSplineLimitation() and the second one is EndSplineLimitation. The first one can be called many times without calling the second one if you need to change splines. After successfull calling of BeginSplineLimitation() all primitive drawing operations will draw only those pixels that lies between specified two splines. When limitation is no longer needed, you have to call EndSplineLimitation(). On the picture below you can see rectangles drawn with such a limitation. The first spline in this case is a cubic bezier spline and the second one is a line lying on the X axis.

Drawing primitive parts laying only between two splines

As you can see from definition of CUBIC_BEZIER_SPLINE at the beginning of the IRenderer class declaration each spline consists of 4 points. The P1 and P2 points are the beginning and the ending of the spline. Points C1 and C2 are control points. So it is actually a cubic bezier curve(it is also clear from the name of the structure). If you need quadratic bezier curve instead, just set both control points same value so they are equal. If you need stright line, set C1 the same value as you have for line start(P1) and set C2 the same value as you have for line end(P2).

Namespace: nitisa
Include: Nitisa/Interfaces/IRenderer.h