Home | All Classes | Grouped Classes | Index | Search

Class CL_GraphicContext

Graphic rendering target. More...

Derived from: none
Derived by: none
Group: Display (Display 2D)

#include <ClanLib/display.h>

Construction:

CL_GraphicContext

Constructs a graphic context.

Attributes:

get_width

Returns the current width of the context.

get_height

Returns the current height of the context.

get_cliprect

Returns the current clipping rectangle used on the graphic context.

get_translate_x

Returns the current effective x-axis translation offset.

get_translate_y

Returns the current effective y-axis translation offset.

get_pixel

Returns a pixel value at specified coordinates.

Operations:

operator =

Copy assignment operator.

begin_3d

Begin window 3D rendering mode.

end_3d

End windows 3D rendering mode.

draw_pixel

Draw a pixel at (x, y) using the specified color.

draw_line

Draw a line from (x1, y1) to (x2, y2) using the specified color.

draw_rect

Draw a rectangle using the specified color.

fill_rect

Draw a filled rectangle using the specified color.

clear

Clears the whole context using the specified color.

set_cliprect

Set the current clipping rectangle.

push_cliprect

Push current clipping rectangle to stack.

pop_cliprect

Pop current clipping rectangle from the stack.

set_translate_offset

Sets the translate offset.

push_translate_offset

Push translation offset onto translation stack.

pop_translate_offset

Pops the last pushed translation offset from the translation offset stack.

Implementation:

impl

Detailed description:

A graphic context is something that ClanLib can render onto.



Questions or comments, write to the
ClanLib mailing list.