Display component class.
Description
The CL_Display class has has two purposes. First it contains the list of
display cards available on the system, and second it contains a set of
functions that eases access to the display card. All these helper
functions operate on the display card selected through
CL_Display::select_card(). For instance, these two lines does exactly the
same thing:
CL_Display::card[0]->select_videomode(640, 480, 16);
-or-
CL_Display::select_videomode(640, 480, 16);
All the helper functions in CL_Display does exactly the same as the name
equalent in CL_DisplayCard. The idea is, that you don't have to pass
around the pointer to the displaycard, if it is always the same
displaycard anyway.
Remember to call CL_System::init_display() before using the display
interface.
Class members
virtual ~CL_Display()
static void flip_display(bool sync=false)
static void clear_display(
float red=0,
float green=0,
float blue=0,
float alpha=1)
static void set_palette(CL_Palette *palette)
static CL_Palette *get_palette()
static void select_card(CL_DisplayCard *card)
static CL_DisplayCard *get_current_card()
static void set_videomode(CL_VidMode *mode)
static void set_videomode(
int width,
int height,
int bpp)
static int get_width()
static int get_height()
static int get_bpp()
static CL_Array<CL_DisplayCard> cards
static int num_cards
static void push_clip_rect()
static void push_clip_rect(const CL_ClipRect &rect)
static CL_ClipRect get_clip_rect()
static void set_clip_rect(const CL_ClipRect &rect)
static void pop_clip_rect()
static void fill_rect(
int x1,
int y1,
int x2,
int y2,
float r,
float g,
float b,
float a)
static void draw_line(
int x1,
int y1,
int x2,
int y2,
float r,
float g,
float b,
float a)
static void sync_buffers()
See Also
CL_DisplayCard | - | The display card class in ClanLib. |
CL_Surface | - | Surface class in ClanLib. |
Back to index
|