supertux
Public Member Functions | List of all members
DrawingContext Class Referencefinal

This class provides functions for drawing things on screen. More...

#include <drawing_context.hpp>

Public Member Functions

 DrawingContext (VideoSystem &video_system, obstack &obst, bool overlay)
 
Rectf get_cliprect () const
 Returns the visible area in world coordinates.
 
Canvascolor ()
 
Canvaslight ()
 
Canvasget_canvas (DrawingTarget target)
 
void set_ambient_color (Color ambient_color)
 
Color get_ambient_color () const
 
void push_transform ()
 
void pop_transform ()
 
DrawingTransformtransform ()
 
const DrawingTransformtransform () const
 
const Vectorget_translation () const
 
void set_translation (const Vector &newtranslation)
 
void set_flip (Flip flip)
 Apply that flip in the next draws (flips are listed on surface.h). More...
 
Flip get_flip () const
 
void set_alpha (float alpha)
 apply that alpha in the next draws (1.0 means fully opaque)
 
float get_alpha () const
 
void clear ()
 
void set_viewport (const Rect &viewport)
 
const Rectget_viewport () const
 
int get_width () const
 
int get_height () const
 
bool use_lightmap () const
 
bool is_overlay () const
 

Detailed Description

This class provides functions for drawing things on screen.

It also maintains a stack of transforms that are applied to graphics.

Member Function Documentation

§ set_flip()

void DrawingContext::set_flip ( Flip  flip)

Apply that flip in the next draws (flips are listed on surface.h).


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