SPH
|
Abstraction of a device used for rendering. More...
#include <RenderContext.h>
Public Member Functions | |
virtual Pixel | size () const =0 |
Returns the size of the canvas associated with the context. More... | |
virtual void | setColor (const Rgba &color, const Flags< ColorFlag > flags)=0 |
Selects the color for one or more drawing modes. More... | |
virtual void | setThickness (const float thickness)=0 |
Modifies the thickness of the lines. More... | |
virtual void | setFontSize (const int fontSize)=0 |
virtual void | fill (const Rgba &color)=0 |
Fills the whole canvas with given color. More... | |
virtual void | drawLine (const Coords p1, const Coords p2)=0 |
Draws a line connecting two points. More... | |
virtual void | drawCircle (const Coords center, const float radius)=0 |
Draws a circle, given its center and a radius. More... | |
virtual void | drawTriangle (const Coords p1, const Coords p2, const Coords p3)=0 |
Draws a triangle given three points. More... | |
virtual void | drawBitmap (const Coords p, const Bitmap< Rgba > &bitmap)=0 |
Draws a bitmap, given the position of its left-top corner. More... | |
virtual void | drawText (const Coords p, const Flags< TextAlign > align, const std::string &s)=0 |
virtual void | drawText (const Coords p, const Flags< TextAlign > align, const std::wstring &s)=0 |
virtual Array< IRenderOutput::Label > | getLabels () const |
![]() | |
virtual | ~Polymorphic () |
Abstraction of a device used for rendering.
The interface is currently quite minimalistic, can be extended if needed.
Definition at line 22 of file RenderContext.h.
|
pure virtual |
Draws a bitmap, given the position of its left-top corner.
Implemented in FlippedRenderContext, WxRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
|
pure virtual |
Draws a circle, given its center and a radius.
Implemented in FlippedRenderContext, WxRenderContext, SmoothedRenderContext, AntiAliasedRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
Draws a line connecting two points.
Implemented in FlippedRenderContext, WxRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
|
pure virtual |
Implemented in FlippedRenderContext, WxRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
|
pure virtual |
Implemented in FlippedRenderContext, WxRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
|
pure virtual |
Draws a triangle given three points.
Implemented in FlippedRenderContext, WxRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
|
pure virtual |
Fills the whole canvas with given color.
This erases any previous content.
Implemented in FlippedRenderContext, WxRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
|
inlinevirtual |
Reimplemented in PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
Definition at line 56 of file RenderContext.h.
|
pure virtual |
Selects the color for one or more drawing modes.
Implemented in FlippedRenderContext, WxRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
|
pure virtual |
Implemented in WxRenderContext, PreviewRenderContext< PixelOp >, PreviewRenderContext< OverPixelOp >, and FlippedRenderContext.
|
pure virtual |
Modifies the thickness of the lines.
Implemented in FlippedRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.
|
pure virtual |
Returns the size of the canvas associated with the context.
Implemented in FlippedRenderContext, WxRenderContext, PreviewRenderContext< PixelOp >, and PreviewRenderContext< OverPixelOp >.