Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members

Canvas Class Reference

Canvas manages a canvas into which a user can paint. More...

#include <Canvas.h>

Inheritance diagram for Canvas

Inheritance graph

[legend]
List of all members.

Public Methods

Construction / Destruction
 Canvas ()
 Construct a new canvas. More...

virtual ~Canvas ()
 Destroy the canvas. More...

Output management
virtual void beginDraw (WinLockInitType initMode) = 0
 Switch drawing window to the window into which the application shall paint. More...

virtual void endDraw (RectangleType *bounds) = 0
 Notify the canvas of the end of user paint operations. More...

virtual void show () = 0
 Display user painted graphics. More...

Physical Display management
Coord getWidth () const
 Get the width of the display. More...

Coord getHeight () const
 Get the height of the display. More...


Static Public Methods

Utility operations
void uniteBounds (RectangleType *rect1Bound, RectangleType *rect2Bound, RectangleType *resultBound)
 Determine a rectangle that encompasses two other rectangles. More...


Protected Attributes

RectangleType displayBounds

Detailed Description

Canvas manages a canvas into which a user can paint.

Definition at line 34 of file Canvas.h.


Constructor & Destructor Documentation

Canvas::Canvas ( ) [inline]
 

Construct a new canvas.

Definition at line 43 of file Canvas.h.

Canvas::~Canvas ( ) [inline, virtual]
 

Destroy the canvas.

Definition at line 57 of file Canvas.h.


Member Function Documentation

void Canvas::beginDraw ( WinLockInitType initMode ) [pure virtual]
 

Switch drawing window to the window into which the application shall paint.

Reimplemented in DoubleBufferCanvas.

void Canvas::endDraw ( RectangleType * bounds ) [pure virtual]
 

Notify the canvas of the end of user paint operations.

Parameters:
bounds   the area that was modified by the user draw operation

Reimplemented in DoubleBufferCanvas.

Coord Canvas::getHeight ( ) const [inline]
 

Get the height of the display.

Definition at line 96 of file Canvas.h.

Coord Canvas::getWidth ( ) const [inline]
 

Get the width of the display.

Definition at line 87 of file Canvas.h.

void Canvas::show ( ) [pure virtual]
 

Display user painted graphics.

Reimplemented in DoubleBufferCanvas.

void Canvas::uniteBounds ( RectangleType * rect1Bound,
RectangleType * rect2Bound,
RectangleType * resultBound ) [inline, static]
 

Determine a rectangle that encompasses two other rectangles.

Parameters:
rect1Bound   the bounds of rectangle #1
rect2Bound   the bounds of rectangle #2
resultBound   the bounds of the encompassing rectangle. rect1Bound, or rect2Bound, and resultBound may safely point to the same RectangleType structure.

Definition at line 114 of file Canvas.h.

Referenced by SpriteGroup::draw(), and DoubleBufferCanvas::endDraw().


Member Data Documentation

RectangleType Canvas::displayBounds [protected]
 

Definition at line 146 of file Canvas.h.


The documentation for this class was generated from the following file:
Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 4 Nov 2000