#include <Renderer.h>
|
| virtual | ~Renderer ()=default |
| |
| virtual void | addListener (std::shared_ptr< IRendererListener > listener)=0 |
| |
| virtual void | removeListener (std::shared_ptr< IRendererListener > listener)=0 |
| |
| virtual float | getDpiX () const noexcept=0 |
| |
| virtual float | getDpiY () const noexcept=0 |
| |
| virtual float | getPixelSize () const noexcept=0 |
| |
| virtual float | getViewScale () noexcept=0 |
| |
| virtual void | setViewScale (float scale)=0 |
| |
| virtual void | zoom (float factor)=0 |
| |
| virtual void | zoomAt (graphics::Point p, float factor)=0 |
| |
| virtual graphics::Point | getViewOffset () const noexcept=0 |
| |
| virtual void | setViewOffset (float x, float y)=0 |
| |
| virtual graphics::Transform | getViewTransform () const noexcept=0 |
| |
| virtual std::shared_ptr< IRenderTarget > | getRenderTarget () const noexcept=0 |
| |
| virtual void | registerStroker (String name, std::shared_ptr< graphics::IStrokerFactory > factory)=0 |
| |
| virtual void | unregisterStroker (String name) noexcept=0 |
| |
| virtual uint64_t | drawModelAsync (int x, int y, int width, int height, graphics::ICanvas *canvas)=0 |
| |
| virtual void | commitModelDraw (uint64_t id)=0 |
| |
| virtual void | drawModel (int x, int y, int width, int height, graphics::ICanvas *canvas)=0 |
| |
| virtual void | drawCaptureStrokes (int x, int y, int width, int height, graphics::ICanvas *canvas)=0 |
| |
The renderer triggers display updates to a IRenderTarget and implements rendering to a ICanvas.
◆ ~Renderer()
| virtual myscript::iink::Renderer::~Renderer |
( |
| ) |
|
|
virtualdefault |
◆ addListener()
| virtual void myscript::iink::Renderer::addListener |
( |
std::shared_ptr< IRendererListener > |
listener | ) |
|
|
pure virtual |
Adds the specified listener to this renderer.
- Parameters
-
| listener | the listener to be added. |
- Exceptions
-
| std::invalid_argument | when listener is nullptr. |
◆ removeListener()
| virtual void myscript::iink::Renderer::removeListener |
( |
std::shared_ptr< IRendererListener > |
listener | ) |
|
|
pure virtual |
Removes the specified listener from this renderer.
- Parameters
-
| listener | the listener to be removed. |
- Exceptions
-
| std::invalid_argument | when listener is nullptr. |
◆ getDpiX()
| virtual float myscript::iink::Renderer::getDpiX |
( |
| ) |
const |
|
pure virtualnoexcept |
Returns the physical horizontal resolution of the display in dots per inch, as given at creation of this renderer.
- Returns
- the horizontal resolution.
◆ getDpiY()
| virtual float myscript::iink::Renderer::getDpiY |
( |
| ) |
const |
|
pure virtualnoexcept |
Returns the physical vertical resolution of the display in dots per inch, as given at creation of this renderer.
- Returns
- the vertical resolution.
◆ getPixelSize()
| virtual float myscript::iink::Renderer::getPixelSize |
( |
| ) |
const |
|
pure virtualnoexcept |
Returns the size of a pixel in model coordinates.
- Returns
- the size of a pixel.
◆ getViewScale()
| virtual float myscript::iink::Renderer::getViewScale |
( |
| ) |
|
|
pure virtualnoexcept |
Returns the current zoom view scale.
- Returns
- the view scale.
◆ setViewScale()
| virtual void myscript::iink::Renderer::setViewScale |
( |
float |
scale | ) |
|
|
pure virtual |
Sets the current zoom view scale.
- Parameters
-
- Exceptions
-
| std::invalid_argument | when scale is not a number or is negative. |
◆ zoom()
| virtual void myscript::iink::Renderer::zoom |
( |
float |
factor | ) |
|
|
pure virtual |
Increases zoom by a factor.
- Parameters
-
| factor | the zoom modification factor. |
- Exceptions
-
| std::invalid_argument | when factor is not a number or is negative. |
◆ zoomAt()
| virtual void myscript::iink::Renderer::zoomAt |
( |
graphics::Point |
p, |
|
|
float |
factor |
|
) |
| |
|
pure virtual |
Increases zoom by a factor around a given point.
- Parameters
-
| p | point around which to adjust the view (view coordinates in pixel). |
| factor | the zoom modification factor. |
- Exceptions
-
| std::invalid_argument | when factor is not a number or is negative. |
◆ getViewOffset()
Returns the view offset.
- Returns
- the view offset (view coordinates in pixel).
◆ setViewOffset()
| virtual void myscript::iink::Renderer::setViewOffset |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
pure virtual |
Sets the view offset.
- Parameters
-
| x | the x coordinate of the view offset (view coordinates in pixel). |
| y | the y coordinate of the view offset (view coordinates in pixel). |
- Exceptions
-
| std::invalid_argument | when x is not a number. |
| std::invalid_argument | when y is not a number. |
◆ getViewTransform()
Returns the transform that maps model coordinates to view coordinates.
- Returns
- the view transform.
◆ getRenderTarget()
| virtual std::shared_ptr< IRenderTarget > myscript::iink::Renderer::getRenderTarget |
( |
| ) |
const |
|
pure virtualnoexcept |
Returns the target that receives display update requests from this renderer.
- Returns
- the render target.
◆ registerStroker()
Registers a custom stroker factory.
- Parameters
-
| name | the value of the -myscript-pen-brush css property that selects this stroker. |
| factory | the user provided stroker factory. |
- Exceptions
-
| std::invalid_argument | when factory is nullptr. |
◆ unregisterStroker()
| virtual void myscript::iink::Renderer::unregisterStroker |
( |
String |
name | ) |
|
|
pure virtualnoexcept |
Unregister custom stroker factory.
- Parameters
-
◆ drawModelAsync()
| virtual uint64_t myscript::iink::Renderer::drawModelAsync |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height, |
|
|
graphics::ICanvas * |
canvas |
|
) |
| |
|
pure virtual |
Requests asynchronous drawing of a region of the Model layer. Completion of the drawing operation must be indicated by a call to commitModelDraw().
- Parameters
-
| x | top left x coordinate of the region to draw (view coordinates in pixel). |
| y | top left y coordinate of the region to draw (view coordinates in pixel). |
| width | width of the region to draw (view coordinates in pixel). |
| height | height of the region to draw (view coordinates in pixel). |
| canvas | target canvas. |
- Returns
- the identifier of the drawing request.
- Exceptions
-
| std::invalid_argument | when canvas is nullptr. |
◆ commitModelDraw()
| virtual void myscript::iink::Renderer::commitModelDraw |
( |
uint64_t |
id | ) |
|
|
pure virtual |
Indicates that an asynchronous drawing of the Model Layer is over.
- Parameters
-
◆ drawModel()
| virtual void myscript::iink::Renderer::drawModel |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height, |
|
|
graphics::ICanvas * |
canvas |
|
) |
| |
|
pure virtual |
Requests drawing of a region of the Model layer.
- Parameters
-
| x | top left x coordinate of the region to draw (view coordinates in pixel). |
| y | top left y coordinate of the region to draw (view coordinates in pixel). |
| width | width of the region to draw (view coordinates in pixel). |
| height | height of the region to draw (view coordinates in pixel). |
| canvas | target canvas. |
- Exceptions
-
| std::invalid_argument | when canvas is nullptr. |
◆ drawCaptureStrokes()
| virtual void myscript::iink::Renderer::drawCaptureStrokes |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height, |
|
|
graphics::ICanvas * |
canvas |
|
) |
| |
|
pure virtual |
Requests drawing of a region of the Capture layer.
- Parameters
-
| x | top left x coordinate of the region to draw (view coordinates in pixel). |
| y | top left y coordinate of the region to draw (view coordinates in pixel). |
| width | width of the region to draw (view coordinates in pixel). |
| height | height of the region to draw (view coordinates in pixel). |
| canvas | target canvas. |
- Exceptions
-
| std::invalid_argument | when canvas is nullptr. |
The documentation for this class was generated from the following file: