Image Component Library (ICL)
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
icl::core::AbstractCanvas Class Referenceabstract

#include <AbstractCanvas.h>

Inheritance diagram for icl::core::AbstractCanvas:
icl::utils::Uncopyable

Classes

struct  ClipRect
 
struct  State
 

Public Types

typedef math::FixedMatrix< float, 3, 3 > Transform
 
typedef core::Color4D32f Color
 

Public Member Functions

 AbstractCanvas ()
 
virtual ~AbstractCanvas ()
 
virtual void draw_point_internal (const utils::Point32f &p)=0
 
virtual void draw_line_internal (const utils::Point32f &a, const utils::Point32f &b)=0
 
virtual void fill_triangle_internal (const utils::Point32f &a, const utils::Point32f &b, const utils::Point32f &c)=0
 
virtual void draw_ellipse_internal (const utils::Point32f &c, const utils::Point32f &axis1, const utils::Point32f &axis2)=0
 
virtual void draw_image_internal (const utils::Point32f &ul, const utils::Point32f &ur, const utils::Point32f &lr, const utils::Point32f &ll, float alpha, scalemode sm)=0
 
virtual const TransformgetTransform () const
 
virtual void getTransform (float &angle, float &tx, float &ty) const
 
virtual Rect32f getClipRect ()
 
virtual void push ()
 
virtual void pop ()
 
virtual void point (float x, float y)
 
virtual void line (float x0, float y0, float x1, float y1)
 
virtual void triangle (float x0, float y0, float x1, float y1, float x2, float y2)
 
virtual void sym (char c, float x, float y)
 
virtual void linestrip (int n, const float *xs, const float *ys, int xStride=1, int yStride=1, bool loop=false)
 
virtual void rect (float x, float y, float w, float h)
 
virtual void circle (float cx, float cy, float r)
 
virtual void ellipse (float cx, float cy, float rx, float ry)
 
virtual void image (const ImgBase *image, float xanchor, float yanchor, float alpha, scalemode sm=interpolateLIN, bool centered=false)
 
virtual void text (const std::string &t, float x, float y, bool centered=false)
 
virtual void linecolor (float r, float g, float b, float a=255)
 
virtual void fillcolor (float r, float g, float b, float a=255)
 
virtual void linewidth (float width)
 
virtual void pointsize (float size)
 
virtual void symsize (float size)
 
virtual void fontsize (float size)
 
virtual void fontname (const std::string &fontname)
 
virtual void transform (const Transform &T)
 
virtual void transform (float tx, float ty, float angle)
 
virtual void reset ()
 resets the transform More...
 
virtual void rotate (float angle)
 
virtual void translate (float tx, float ty)
 
virtual void scale (float s)
 
virtual void scale (float sx, float sy)
 

Protected Member Functions

utils::Point32f transform (float x, float y) const
 
bool clip (float x, float y) const
 
bool clip (const Point32f &p) const
 
- Protected Member Functions inherited from icl::utils::Uncopyable
 Uncopyable ()
 Empty base constructor. More...
 

Protected Attributes

State state
 
std::vector< Statestack
 

Member Typedef Documentation

◆ Color

◆ Transform

Constructor & Destructor Documentation

◆ AbstractCanvas()

icl::core::AbstractCanvas::AbstractCanvas ( )
inline

◆ ~AbstractCanvas()

virtual icl::core::AbstractCanvas::~AbstractCanvas ( )
inlinevirtual

Member Function Documentation

◆ circle()

virtual void icl::core::AbstractCanvas::circle ( float  cx,
float  cy,
float  r 
)
virtual

◆ clip() [1/2]

bool icl::core::AbstractCanvas::clip ( float  x,
float  y 
) const
inlineprotected

◆ clip() [2/2]

bool icl::core::AbstractCanvas::clip ( const Point32f p) const
inlineprotected

◆ draw_ellipse_internal()

virtual void icl::core::AbstractCanvas::draw_ellipse_internal ( const utils::Point32f c,
const utils::Point32f axis1,
const utils::Point32f axis2 
)
pure virtual

◆ draw_image_internal()

virtual void icl::core::AbstractCanvas::draw_image_internal ( const utils::Point32f ul,
const utils::Point32f ur,
const utils::Point32f lr,
const utils::Point32f ll,
float  alpha,
scalemode  sm 
)
pure virtual

◆ draw_line_internal()

virtual void icl::core::AbstractCanvas::draw_line_internal ( const utils::Point32f a,
const utils::Point32f b 
)
pure virtual

◆ draw_point_internal()

virtual void icl::core::AbstractCanvas::draw_point_internal ( const utils::Point32f p)
pure virtual

◆ ellipse()

virtual void icl::core::AbstractCanvas::ellipse ( float  cx,
float  cy,
float  rx,
float  ry 
)
virtual

◆ fill_triangle_internal()

virtual void icl::core::AbstractCanvas::fill_triangle_internal ( const utils::Point32f a,
const utils::Point32f b,
const utils::Point32f c 
)
pure virtual

◆ fillcolor()

virtual void icl::core::AbstractCanvas::fillcolor ( float  r,
float  g,
float  b,
float  a = 255 
)
inlinevirtual

◆ fontname()

virtual void icl::core::AbstractCanvas::fontname ( const std::string &  fontname)
inlinevirtual

◆ fontsize()

virtual void icl::core::AbstractCanvas::fontsize ( float  size)
inlinevirtual

◆ getClipRect()

virtual Rect32f icl::core::AbstractCanvas::getClipRect ( )
inlinevirtual

◆ getTransform() [1/2]

virtual const Transform& icl::core::AbstractCanvas::getTransform ( ) const
inlinevirtual

◆ getTransform() [2/2]

virtual void icl::core::AbstractCanvas::getTransform ( float &  angle,
float &  tx,
float &  ty 
) const
inlinevirtual

◆ image()

virtual void icl::core::AbstractCanvas::image ( const ImgBase image,
float  xanchor,
float  yanchor,
float  alpha,
scalemode  sm = interpolateLIN,
bool  centered = false 
)
virtual

◆ line()

virtual void icl::core::AbstractCanvas::line ( float  x0,
float  y0,
float  x1,
float  y1 
)
virtual

◆ linecolor()

virtual void icl::core::AbstractCanvas::linecolor ( float  r,
float  g,
float  b,
float  a = 255 
)
inlinevirtual

◆ linestrip()

virtual void icl::core::AbstractCanvas::linestrip ( int  n,
const float *  xs,
const float *  ys,
int  xStride = 1,
int  yStride = 1,
bool  loop = false 
)
virtual

◆ linewidth()

virtual void icl::core::AbstractCanvas::linewidth ( float  width)
inlinevirtual

◆ point()

virtual void icl::core::AbstractCanvas::point ( float  x,
float  y 
)
virtual

◆ pointsize()

virtual void icl::core::AbstractCanvas::pointsize ( float  size)
inlinevirtual

◆ pop()

virtual void icl::core::AbstractCanvas::pop ( )
inlinevirtual

◆ push()

virtual void icl::core::AbstractCanvas::push ( )
inlinevirtual

◆ rect()

virtual void icl::core::AbstractCanvas::rect ( float  x,
float  y,
float  w,
float  h 
)
virtual

◆ reset()

virtual void icl::core::AbstractCanvas::reset ( )
inlinevirtual

resets the transform

◆ rotate()

virtual void icl::core::AbstractCanvas::rotate ( float  angle)
inlinevirtual

◆ scale() [1/2]

virtual void icl::core::AbstractCanvas::scale ( float  s)
inlinevirtual

◆ scale() [2/2]

virtual void icl::core::AbstractCanvas::scale ( float  sx,
float  sy 
)
inlinevirtual

◆ sym()

virtual void icl::core::AbstractCanvas::sym ( char  c,
float  x,
float  y 
)
virtual

◆ symsize()

virtual void icl::core::AbstractCanvas::symsize ( float  size)
inlinevirtual

◆ text()

virtual void icl::core::AbstractCanvas::text ( const std::string &  t,
float  x,
float  y,
bool  centered = false 
)
virtual

◆ transform() [1/3]

utils::Point32f icl::core::AbstractCanvas::transform ( float  x,
float  y 
) const
inlineprotected

◆ transform() [2/3]

virtual void icl::core::AbstractCanvas::transform ( const Transform T)
inlinevirtual

◆ transform() [3/3]

virtual void icl::core::AbstractCanvas::transform ( float  tx,
float  ty,
float  angle 
)
inlinevirtual

◆ translate()

virtual void icl::core::AbstractCanvas::translate ( float  tx,
float  ty 
)
inlinevirtual

◆ triangle()

virtual void icl::core::AbstractCanvas::triangle ( float  x0,
float  y0,
float  x1,
float  y1,
float  x2,
float  y2 
)
virtual

Member Data Documentation

◆ stack

std::vector<State> icl::core::AbstractCanvas::stack
protected

◆ state

State icl::core::AbstractCanvas::state
protected

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