SPH
Public Member Functions | List of all members
WxRenderContext Class Reference

Render context drawing directly into wxDC. More...

#include <RenderContext.h>

Inheritance diagram for WxRenderContext:
IRenderContext Polymorphic

Public Member Functions

 WxRenderContext (wxDC &dc)
 
virtual Pixel size () const override
 Returns the size of the canvas associated with the context. More...
 
virtual void setColor (const Rgba &color, const Flags< ColorFlag > flags) override
 Selects the color for one or more drawing modes. More...
 
virtual void setThickness (const float UNUSED(newThickness)) override
 
virtual void setFontSize (const int newFontSize) override
 
virtual void fill (const Rgba &color) override
 Fills the whole canvas with given color. More...
 
virtual void drawLine (const Coords p1, const Coords p2) override
 Draws a line connecting two points. More...
 
virtual void drawCircle (const Coords center, const float radius) override
 Draws a circle, given its center and a radius. More...
 
virtual void drawTriangle (const Coords, const Coords, const Coords) override
 Draws a triangle given three points. More...
 
virtual void drawBitmap (const Coords, const Bitmap< Rgba > &) override
 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) override
 
virtual void drawText (const Coords p, const Flags< TextAlign > align, const std::wstring &s) override
 
- Public Member Functions inherited from IRenderContext
virtual void setThickness (const float thickness)=0
 Modifies the thickness of the lines. More...
 
virtual Array< IRenderOutput::LabelgetLabels () const
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Render context drawing directly into wxDC.

Must be used only in main thread!!

Definition at line 178 of file RenderContext.h.

Constructor & Destructor Documentation

◆ WxRenderContext()

WxRenderContext::WxRenderContext ( wxDC &  dc)
inline

Definition at line 185 of file RenderContext.h.

Member Function Documentation

◆ drawBitmap()

virtual void WxRenderContext::drawBitmap ( const  p,
const Bitmap< Rgba > &  bitmap 
)
inlineoverridevirtual

Draws a bitmap, given the position of its left-top corner.

Implements IRenderContext.

Definition at line 237 of file RenderContext.h.

◆ drawCircle()

virtual void WxRenderContext::drawCircle ( const Coords  center,
const float  radius 
)
inlineoverridevirtual

Draws a circle, given its center and a radius.

Implements IRenderContext.

Definition at line 229 of file RenderContext.h.

◆ drawLine()

virtual void WxRenderContext::drawLine ( const Coords  p1,
const Coords  p2 
)
inlineoverridevirtual

Draws a line connecting two points.

Implements IRenderContext.

Definition at line 225 of file RenderContext.h.

◆ drawText() [1/2]

virtual void WxRenderContext::drawText ( const Coords  p,
const Flags< TextAlign align,
const std::string &  s 
)
inlineoverridevirtual

Implements IRenderContext.

Definition at line 241 of file RenderContext.h.

◆ drawText() [2/2]

virtual void WxRenderContext::drawText ( const Coords  p,
const Flags< TextAlign align,
const std::wstring &  s 
)
inlineoverridevirtual

Implements IRenderContext.

Definition at line 246 of file RenderContext.h.

◆ drawTriangle()

virtual void WxRenderContext::drawTriangle ( const  p1,
const  p2,
const  p3 
)
inlineoverridevirtual

Draws a triangle given three points.

Implements IRenderContext.

Definition at line 233 of file RenderContext.h.

◆ fill()

virtual void WxRenderContext::fill ( const Rgba color)
inlineoverridevirtual

Fills the whole canvas with given color.

This erases any previous content.

Implements IRenderContext.

Definition at line 219 of file RenderContext.h.

◆ setColor()

virtual void WxRenderContext::setColor ( const Rgba color,
const Flags< ColorFlag flags 
)
inlineoverridevirtual

Selects the color for one or more drawing modes.

Implements IRenderContext.

Definition at line 196 of file RenderContext.h.

◆ setFontSize()

virtual void WxRenderContext::setFontSize ( const int  newFontSize)
inlineoverridevirtual

Implements IRenderContext.

Definition at line 213 of file RenderContext.h.

◆ setThickness()

virtual void WxRenderContext::setThickness ( const float   UNUSEDnewThickness)
inlineoverridevirtual
Todo:

Definition at line 210 of file RenderContext.h.

◆ size()

virtual Pixel WxRenderContext::size ( ) const
inlineoverridevirtual

Returns the size of the canvas associated with the context.

Implements IRenderContext.

Definition at line 191 of file RenderContext.h.


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