MyScript Interactive Ink SDK  4.0.0
Public Member Functions | List of all members
myscript::iink::IRenderTarget Class Referenceabstract

#include <IRenderTarget.h>

Public Member Functions

virtual ~IRenderTarget ()=default
 
virtual void invalidate (std::shared_ptr< Renderer > renderer, std::underlying_type< LayerType >::type layers)=0
 
virtual void invalidate (std::shared_ptr< Renderer > renderer, int x, int y, int width, int height, std::underlying_type< LayerType >::type layers)=0
 
virtual bool supportsOffscreenRendering ()
 
virtual float getPixelDensity ()
 
virtual uint32_t createOffscreenRenderSurface (int width, int height, bool alphaMask)
 
virtual void releaseOffscreenRenderSurface (uint32_t surfaceId)
 
virtual std::shared_ptr< graphics::ICanvas > createOffscreenRenderCanvas (uint32_t surfaceId)
 
virtual void releaseOffscreenRenderCanvas (graphics::ICanvas *canvas)
 

Detailed Description

Represents a render target for the iink renderer.

Constructor & Destructor Documentation

◆ ~IRenderTarget()

virtual myscript::iink::IRenderTarget::~IRenderTarget ( )
virtualdefault

Member Function Documentation

◆ invalidate() [1/2]

virtual void myscript::iink::IRenderTarget::invalidate ( std::shared_ptr< Renderer >  renderer,
std::underlying_type< LayerType >::type  layers 
)
pure virtual

Invalidates the given set of layers.

Parameters
rendererthe renderer to which this render target has been bound.
layersthe set of layers to invalidate.

◆ invalidate() [2/2]

virtual void myscript::iink::IRenderTarget::invalidate ( std::shared_ptr< Renderer >  renderer,
int  x,
int  y,
int  width,
int  height,
std::underlying_type< LayerType >::type  layers 
)
pure virtual

Invalidates a specified rectangle area on the given set of layers. The rectangle area is specified in pixel coordinates.

Parameters
rendererthe renderer to which this render target has been bound.
xthe x position of the rectangle area (view coordinates in pixel).
ythe y position of the rectangle area (view coordinates in pixel).
widththe width of the rectangle area (view coordinates in pixel).
heightthe height of the rectangle area (view coordinates in pixel).
layersthe set of layers to invalidate.

◆ supportsOffscreenRendering()

virtual bool myscript::iink::IRenderTarget::supportsOffscreenRendering ( )
inlinevirtual

Indicates whether this render target supports offscreen rendering.

Returns
true if offscreen rendering is supported, otherwise false.
Since
2.0

◆ getPixelDensity()

virtual float myscript::iink::IRenderTarget::getPixelDensity ( )
inlinevirtual

Returns the render target pixel density

Note
also known as DIP, density-independent pixels on Android, or dppx.
Since
2.0

◆ createOffscreenRenderSurface()

virtual uint32_t myscript::iink::IRenderTarget::createOffscreenRenderSurface ( int  width,
int  height,
bool  alphaMask 
)
inlinevirtual

Requests the creation of an offscreen render surface (e.g. a bitmap), and returns a unique identifier for that surface.

Note
createOffscreenRenderCanvas() will be called with this identifier, to request drawing of the associated surface.
Parameters
widththe width of the surface to create (view coordinates in pixel).
heightthe height of the surface to create (view coordinates in pixel).
alphaMaskrequest creation of an alpha mask. Only the alpha channel is relevant. The actual red, green and blue channel values are given by the blend color.
Returns
the identifier of the created surface.
Since
2.0

◆ releaseOffscreenRenderSurface()

virtual void myscript::iink::IRenderTarget::releaseOffscreenRenderSurface ( uint32_t  surfaceId)
inlinevirtual

Requests the release of the offscreen render surface associated with a given identifier.

Parameters
surfaceIdthe identifier of the surface to release.
Since
2.0

◆ createOffscreenRenderCanvas()

virtual std::shared_ptr<graphics::ICanvas> myscript::iink::IRenderTarget::createOffscreenRenderCanvas ( uint32_t  surfaceId)
inlinevirtual

Creates a Canvas that draws onto the offscreen render surface associated with a given identifier.

Parameters
surfaceIdthe identifier of the surface to be drawn.
Returns
a Canvas to draw on the requested surface.
Since
2.0

◆ releaseOffscreenRenderCanvas()

virtual void myscript::iink::IRenderTarget::releaseOffscreenRenderCanvas ( graphics::ICanvas *  canvas)
inlinevirtual

Requests the release of an offscreen render canvas.

Parameters
canvasthe canvas to release.
Since
2.0

The documentation for this class was generated from the following file: