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, const int x1, const int y1, const int x2, const int y2)
- Creates a view with the specified rectangle on the Canvas (screen/bitmap).
- void setViewParams (Drawable* Canvas, const int x1, const int y1, const int x2, const int y2)
- Changes the default parameters.
- void setWorldPosition (const int x, const int y)
- Sets the position of the view in the 2D World.
- const Vector2D& getWorldPosition () const
- Retrieve the View's position.
- const Rect2D& getWindow () const
- Retrieve the View's viewport.
- Drawable* getCanvas () const
- Retrieve the View's canvas.
- virtual int beginRendering ()
- Must be called before rendering, to ensure correct clipping.
- virtual 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, const int x1, const int y1, const int x2, const int y2)
Creates a view with the specified rectangle on the Canvas (screen/bitmap).
void View2D::setViewParams(Drawable* Canvas, const int x1, const int y1, const int x2, const int y2)
Changes the default parameters.
void View2D::setWorldPosition(const int x, const int y)
Sets the position of the view in the 2D World.
This specifies the View's top left corner position.
const Vector2D& View2D::getWorldPosition() const
Retrieve the View's position.
const Rect2D& View2D::getWindow() const
Retrieve the View's viewport.
Drawable* View2D::getCanvas() const
Retrieve the View's canvas.
virtual int View2D::beginRendering() [virtual]
Must be called before rendering, to ensure correct clipping.
virtual int View2D::endRendering() [virtual]
Must be called after rendering, to ensure correct clipping.
The documentation for this class was generated from the following file: