TBTK
TBTK::Canvas< CoordinateType > Class Template Reference

Classes

class  Pixel
 
class  RGBA
 

Public Member Functions

 Canvas (unsigned int width, unsigned int height)
 
 ~Canvas ()
 
void setOrigin (CoordinateType x, CoordinateType y)
 
void setBasisVectors (std::initializer_list< std::initializer_list< CoordinateType >> basisVectors)
 
void drawPixel (const RGBA &rgba, CoordinateType x, CoordinateType y)
 
void drawCircle (const RGBA &rgba, CoordinateType x, CoordinateType y, CoordinateType radius)
 
void save (std::string filename) const
 
template<>
void drawPixel (const RGBA &rgba, unsigned int x, unsigned int y)
 
template<>
void drawPixel (const RGBA &rgba, double x, double y)
 
template<>
void drawCircle (const RGBA &rgba, unsigned int x, unsigned int y, unsigned int radius)
 
template<>
void drawCircle (const RGBA &rgba, double x, double y, double radius)
 

Constructor & Destructor Documentation

template<typename CoordinateType >
TBTK::Canvas< CoordinateType >::Canvas ( unsigned int  width,
unsigned int  height 
)

Constructor.

template<typename CoordinateType >
TBTK::Canvas< CoordinateType >::~Canvas ( )

Destructor.

Member Function Documentation

template<typename CoordinateType >
void TBTK::Canvas< CoordinateType >::drawCircle ( const RGBA rgba,
CoordinateType  x,
CoordinateType  y,
CoordinateType  radius 
)

Draw circle.

template<typename CoordinateType >
void TBTK::Canvas< CoordinateType >::drawPixel ( const RGBA rgba,
CoordinateType  x,
CoordinateType  y 
)

Draw pixel.

template<typename CoordinateType >
void TBTK::Canvas< CoordinateType >::save ( std::string  filename) const
inline

Save canvas to file.

template<typename CoordinateType >
void TBTK::Canvas< CoordinateType >::setBasisVectors ( std::initializer_list< std::initializer_list< CoordinateType >>  basisVectors)
inline

Set basis vectors.

template<typename CoordinateType >
void TBTK::Canvas< CoordinateType >::setOrigin ( CoordinateType  x,
CoordinateType  y 
)

Set origin.


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