PlayerCc::Graphics2dProxy Class Reference

The Graphics2dProxy class is used to draw simple graphics into a rendering device provided by Player using the graphics2d interface. More...

#include <playerc++.h>

Inheritance diagram for PlayerCc::Graphics2dProxy:
Collaboration diagram for PlayerCc::Graphics2dProxy:

List of all members.


Detailed Description

The Graphics2dProxy class is used to draw simple graphics into a rendering device provided by Player using the graphics2d interface.

For example, the Stage plugin implements this interface so you can draw into the Stage window. This is very useful to visualize what's going on in your controller.

Public Member Functions

 Graphics2dProxy (PlayerClient *aPc, uint32_t aIndex=0)
 Constructor.
 ~Graphics2dProxy ()
 Destructor.
void Color (player_color_t col)
 Set the current pen color.
void Color (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
 Set the current pen color.
void Clear (void)
 Clear the drawing area.
void DrawPoints (player_point_2d_t pts[], int count)
 Draw a set of points.
void DrawPolygon (player_point_2d_t pts[], int count, bool filled, player_color_t fill_color)
 Draw a polygon defined by a set of points.
void DrawPolyline (player_point_2d_t pts[], int count)
 Draw a line connecting set of points.
void DrawMultiline (player_point_2d_t pts[], int count)
 Draw multiple lines. Lines ending points are at pts[2n] pts[2n+1] where 2n+1<count.

Private Member Functions

void Subscribe (uint32_t aIndex)
void Unsubscribe ()

Private Attributes

playerc_graphics2d_tmDevice

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