Class hierarchy Compound list File list Compound Members
View2D Class Reference
View2D is the visible rectangle in the infinite 2D world. More...
List of all members.
Public Members
- View2D (Drawable* Canvas, int x1, int y1, int x2, int y2)
- Creates a view with the specified rectangle on the Canvas (screen/bitmap).
- void setViewParams (Drawable* Canvas, int x1, int y1, int x2, int y2)
- Changes the default parameters.
- void setWorldPosition (int x, int y)
- Sets the position of the view in the 2D World.
- Vector2D& getWorldPosition ()
- Retrieve the View's position.
- int beginRendering ()
- Must be called before rendering, to ensure correct clipping.
- int renderSprite (Bitmap* BM, Vector2D& Pos, Rect2D R=Rect2D())
- Render a sprite's bitmap in the specified world coordinates.
- int endRendering ()
- Must be called after rendering, to ensure correct clipping.
Detailed Description
View2D is the visible rectangle in the infinite 2D world.
A World2D has an active View2D for rendering its sprites.
Member Function Documentation
View2D::View2D(Drawable* Canvas, int x1, int y1, int x2, int y2)
Creates a view with the specified rectangle on the Canvas (screen/bitmap).
void View2D::setViewParams(Drawable* Canvas, int x1, int y1, int x2, int y2)
Changes the default parameters.
void View2D::setWorldPosition(int x, int y)
Sets the position of the view in the 2D World.
This specifies the View's top left corner position.
Vector2D& View2D::getWorldPosition()
Retrieve the View's position.
int View2D::beginRendering()
Must be called before rendering, to ensure correct clipping.
int View2D::renderSprite(Bitmap* BM, Vector2D& Pos, Rect2D R=Rect2D())
Render a sprite's bitmap in the specified world coordinates.
int View2D::endRendering()
Must be called after rendering, to ensure correct clipping.
The documentation for this class was generated from the following file: