20 #ifndef SDLTK_CANVAS_H 21 #define SDLTK_CANVAS_H 47 virtual
void begin() {}
53 virtual void fill (
const Rect & rect) = 0;
103 for (Uint16 i=0; i < text.length(); i++)
116 for (Uint16 i=0; i < text.length(); i++)
134 #endif // SDLTK_CANVAS_H const ImageFont & font() const
Definition: canvas.h:74
virtual void image(const Image &image, const Rect &src, const Rect &dest)=0
void rect(Rect *const rec)
Definition: canvas.h:64
Sint16 x() const
Definition: rect.h:102
Rect mClipRect
Definition: canvas.h:87
const Image & image()
Definition: imagefont.h:56
Image to display either on an OpenGL- or plain SDL-Surface.
Definition: image.h:39
Color mColor
Definition: canvas.h:84
void setFont(const String &fname, const String &glyphs, uchar alpha=255)
Definition: canvas.cpp:25
void setWidth(Uint16 w)
Definition: size.h:61
Uint16 spacing() const
Definition: imagefont.h:59
SDL_Surface * mSurface
Definition: canvas.h:82
unsigned char uchar
Definition: types.h:127
Size mTextSize
Definition: canvas.h:83
const Size & size
Definition: rect.h:39
virtual void line(const Point &pos1, const Point &pos2)=0
void set(const Point &pos)
Definition: rect.h:73
virtual void rect(const Rect &rect)=0
const Rect & clipRect() const
Definition: canvas.h:79
const Rect & glyph(Uint8 chr) const
Definition: imagefont.h:70
const Color & color() const
Definition: canvas.h:75
const Size & size() const
Definition: image.h:64
void setSurface(SDL_Surface *const surface)
Definition: canvas.h:60
virtual void clearClipRect()
Definition: canvas.h:57
virtual void setClipRect(const Rect &rect)
Definition: canvas.h:56
void clear()
initializes everything to 0.
Definition: size.h:54
Uint16 textHeight() const
Definition: canvas.h:126
ImageFont mFont
Definition: canvas.h:85
const Size & textSize(const String &text)
Definition: canvas.h:112
#define ROLAND_DEFAULT
Definition: compspec.h:46
unsigned int uint
Definition: types.h:121
virtual void setColor(const Color &color)
Definition: canvas.h:55
Defines a 2D point (x, y)
Definition: point.h:28
Uint16 height() const
Definition: rect.h:105
virtual void fill(const Rect &rect)=0
uint width()
Definition: canvas.h:77
defines a planar size (width, height)
Definition: size.h:30
void write(const Point &pos, const String &text)
Definition: canvas.h:99
void point(Point *const pos)
Definition: canvas.h:62
RGBA Color Type.
Definition: color.h:30
Uint16 width() const
Definition: size.h:57
virtual void point(const Point &pos)=0
a font created from an Image
Definition: imagefont.h:33
std::string String
Definition: types.h:29
void setHeight(Uint16 h)
Definition: size.h:62
void image(Image *const img, const Point &pos)
Definition: canvas.h:66
Uint16 width() const
Definition: rect.h:104
void fill(Rect *const rec)
Definition: canvas.h:65
String mNumber
Definition: canvas.h:86
the SDL based Stuff
Definition: audio.cpp:22
Canvas() ROLAND_DEFAULT virtual ~Canvas() ROLAND_DEFAULT virtual void begin()
Definition: canvas.h:44
virtual void end()
Definition: canvas.h:48
void line(Point *const pos1, Point *const pos2)
Definition: canvas.h:63