CL_GraphicContext - ClanLib Game SDK

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_modelview | Returns the current effective modelview matrix.
get_pixel | Returns a pixel value at specified coordinates.
get_pixeldata | Return the content of buffer 'i' copyied into a CL_PixelBuffer
get_max_surface_size | Returns the maximum size of a surface this graphic context supports.

Operations:

operator = | Copy assignment operator.
flush | Flushes current rendering batch. Deprecated
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_lines | Draw a continuous chain of lines in the specified color.
draw_rect | Draw a rectangle using the specified color.
fill_rect | Draw a gradient rectangle using the specified gradient.
draw_quad | Draw a quad using the specified color.
fill_quad | Draw a gradient quad using the specified gradient.
draw_triangle | Draw a triangle using the specified color.
fill_triangle | Draw a gradient filled triangle.
draw_triangles | Draw triangles with color array (optionally textured).
draw_trianglesd | Draw triangle array with color array (optionally textured).
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_modelview | Sets the model view matrix to a new matrix.
add_modelview | Multiplies the passed matrix onto the model view matrix.
push_modelview | Pushes current model view matrix onto the model view stack.
set_translate | Sets a translate offset matrix, ignoring any earlier model view settings.
add_translate | Adds the translate offset.
push_translate | Push translation offset onto model view stack.
set_rotate | Sets a rotation matrix, ignoring any earlier model view settings.
add_rotate | Adds a rotation matrix to existing model view.
push_rotate | Pushes a rotation matrix onto model view stack.
set_scale | Sets a scale matrix, ignoring any earlier model view settings.
add_scale | Adds a scale matrix to existing model view.
push_scale | Pushes a scale matrix onto model view stack.
pop_modelview | Pops last pushed model view matrix off the stack and makes it the active one.
clear_stencil | Clear the stencil buffer
set_stencil_operation | Set stencil test function when writing to stencil, and operations to do when a test passes or fails
enable_stencil_write | Enables writing to the stencil buffer
enable_stencil_test | Enables stencil buffer testing

Implementation:

impl |

Detailed description:

!group=Display/Display 2D! !header=display.h!

A graphic context is something that ClanLib can render onto.

Questions or comments, write to the ClanLib mailing list.