ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
Public Member Functions | Protected Attributes | List of all members
Canvas Class Referenceabstract

#include <canvas.h>

Inheritance diagram for Canvas:
CanvasGL CanvasStd

Public Member Functions

 Canvas () ROLAND_DEFAULT virtual ~Canvas() ROLAND_DEFAULT virtual void begin()
 
virtual void end ()
 
virtual void point (const Point &pos)=0
 
virtual void line (const Point &pos1, const Point &pos2)=0
 
virtual void rect (const Rect &rect)=0
 
virtual void fill (const Rect &rect)=0
 
virtual void image (const Image &image, const Rect &src, const Rect &dest)=0
 
virtual void setColor (const Color &color)
 
virtual void setClipRect (const Rect &rect)
 
virtual void clearClipRect ()
 
void setFont (const String &fname, const String &glyphs, uchar alpha=255)
 
void setSurface (SDL_Surface *const surface)
 
void point (Point *const pos)
 
void line (Point *const pos1, Point *const pos2)
 
void rect (Rect *const rec)
 
void fill (Rect *const rec)
 
void image (Image *const img, const Point &pos)
 
void image (const Image &img, const Point &pos)
 
void write (const Point &pos, const String &text)
 
const SizetextSize (const String &text)
 
Uint16 textHeight () const
 
const ImageFontfont () const
 
const Colorcolor () const
 
uint width ()
 
const RectclipRect () const
 

Protected Attributes

SDL_Surface * mSurface
 
Size mTextSize
 
Color mColor
 
ImageFont mFont
 
String mNumber
 
Rect mClipRect
 

Detailed Description

Author
Fred Klaus devel.nosp@m.opme.nosp@m.nt@fk.nosp@m.web..nosp@m.de */

Constructor & Destructor Documentation

Canvas ( )
inline

Member Function Documentation

virtual void clearClipRect ( )
inlinevirtual

Reimplemented in CanvasGL, and CanvasStd.

References Canvas::setFont().

Referenced by Label::draw(), and List::draw().

const Rect& clipRect ( ) const
inline

References Canvas::mClipRect.

const Color& color ( ) const
inline
virtual void end ( )
inlinevirtual
virtual void fill ( const Rect rect)
pure virtual

Implemented in CanvasGL, and CanvasStd.

Referenced by Label::drawBackground(), and Canvas::end().

void fill ( Rect *const  rec)
inline

References Canvas::fill().

Referenced by Canvas::fill().

const ImageFont& font ( ) const
inline

References Canvas::mFont.

virtual void image ( const Image image,
const Rect src,
const Rect dest 
)
pure virtual
void image ( Image *const  img,
const Point pos 
)
inline
void image ( const Image img,
const Point pos 
)
inline

References Canvas::image(), and Image::size().

virtual void line ( const Point pos1,
const Point pos2 
)
pure virtual

Implemented in CanvasGL, and CanvasStd.

Referenced by Label::drawBorder(), and Canvas::end().

void line ( Point *const  pos1,
Point *const  pos2 
)
inline

References Canvas::line().

Referenced by Canvas::line().

virtual void point ( const Point pos)
pure virtual

Implemented in CanvasGL.

Referenced by CanvasStd::clearClipRect(), and Canvas::end().

void point ( Point *const  pos)
inline

References Canvas::point().

Referenced by Canvas::point().

virtual void rect ( const Rect rect)
pure virtual
void rect ( Rect *const  rec)
inline

References Canvas::rect().

Referenced by Canvas::rect().

virtual void setClipRect ( const Rect rect)
inlinevirtual

Reimplemented in CanvasGL, and CanvasStd.

Referenced by Label::draw(), and List::draw().

virtual void setColor ( const Color color)
inlinevirtual
void setFont ( const String fname,
const String glyphs,
uchar  alpha = 255 
)

References ImageFont::load(), and Canvas::mFont.

Referenced by Canvas::clearClipRect(), and initGui().

void setSurface ( SDL_Surface *const  surface)
inline

References Canvas::mSurface.

Referenced by VideoStd::init(), and VideoGL::init().

Uint16 textHeight ( ) const
inline
const Size & textSize ( const String text)
inline
uint width ( )
inline

References Canvas::mSurface.

void write ( const Point pos,
const String text 
)
inline

Member Data Documentation

Rect mClipRect
protected
Color mColor
protected
ImageFont mFont
protected
String mNumber
protected
SDL_Surface* mSurface
protected
Size mTextSize
protected

Referenced by Canvas::textSize().


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