SPH
Public Member Functions | Protected Member Functions | List of all members
AntiAliasedRenderContext Class Reference

#include <RenderContext.h>

Inheritance diagram for AntiAliasedRenderContext:
PreviewRenderContext< OverPixelOp > IRenderContext Polymorphic SmoothedRenderContext

Public Member Functions

 AntiAliasedRenderContext (Bitmap< Rgba > &bitmap)
 
virtual void drawCircle (const Coords center, const float radius) override
 Draws a circle, given its center and a radius. More...
 
- Public Member Functions inherited from PreviewRenderContext< OverPixelOp >
virtual void fill (const Rgba &color) override
 Fills the whole canvas with given color. More...
 
 PreviewRenderContext (Bitmap< Rgba > &bitmap)
 
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 newThickness) override
 Modifies the thickness of the lines. More...
 
virtual void setFontSize (const int newFontSize) override
 
virtual void drawLine (const Coords p1, const Coords p2) override
 Draws a line connecting two points. More...
 
virtual void drawTriangle (const Coords p1, const Coords p2, const Coords p3) override
 Draws a triangle given three points. More...
 
virtual void drawBitmap (const Coords p, const Bitmap< Rgba > &subBitmap) 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
 
virtual Array< IRenderOutput::LabelgetLabels () const override
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Protected Member Functions

void drawSafe (const Pixel p, const Rgba c)
 

Additional Inherited Members

- Public Attributes inherited from PreviewRenderContext< OverPixelOp >
Rgba line
 
Rgba fill
 
Rgba text
 
- Protected Attributes inherited from PreviewRenderContext< OverPixelOp >
OverPixelOp pixelOp
 
Bitmap< Rgba > & bitmap
 
Array< IRenderOutput::Labellabels
 
struct {
   Rgba   line = Rgba::black()
 
   Rgba   fill = Rgba::black()
 
   Rgba   text = Rgba::white()
 
colors
 
float thickness
 
int fontSize
 

Detailed Description

Todo:
do not derive from PreviewRenderContext, rather some RenderContextBase; AA context is NOT a preview render context!

Definition at line 146 of file RenderContext.h.

Constructor & Destructor Documentation

◆ AntiAliasedRenderContext()

AntiAliasedRenderContext::AntiAliasedRenderContext ( Bitmap< Rgba > &  bitmap)
inline

Definition at line 148 of file RenderContext.h.

Member Function Documentation

◆ drawCircle()

void AntiAliasedRenderContext::drawCircle ( const Coords  center,
const float  radius 
)
overridevirtual

Draws a circle, given its center and a radius.

Reimplemented from PreviewRenderContext< OverPixelOp >.

Reimplemented in SmoothedRenderContext.

Definition at line 168 of file RenderContext.cpp.

◆ drawSafe()

void AntiAliasedRenderContext::drawSafe ( const Pixel  p,
const Rgba  c 
)
inlineprotected

Definition at line 154 of file RenderContext.h.


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