Fawkes API  Fawkes Development Version
VisualDisplay2D::Circle Class Reference

Class representing a circle Line represented by its center point and radius. More...

#include "visdisplay.h"

Inheritance diagram for VisualDisplay2D::Circle:

List of all members.

Public Member Functions

 Circle (float x, float y, float radius, unsigned int id, unsigned int owner, fawkes::VisualDisplay2DInterface::LineStyle line_style=fawkes::VisualDisplay2DInterface::LS_SOLID, unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=0)
 Constructor.
void draw (Cairo::RefPtr< Cairo::Context > &cr)
 Draw shape to Cairo context.

Detailed Description

Class representing a circle Line represented by its center point and radius.

Author:
Tim Niemueller

Constructor & Destructor Documentation

VisualDisplay2D::Circle::Circle ( float  x,
float  y,
float  radius,
unsigned int  id,
unsigned int  owner,
fawkes::VisualDisplay2DInterface::LineStyle  line_style = fawkes::VisualDisplay2DInterface::LS_SOLID,
unsigned char  r = 0,
unsigned char  g = 0,
unsigned char  b = 0,
unsigned char  a = 0 
)

Constructor.

Parameters:
xX coordinate of center point
yY coordinate of center point
radiusradius of the circle
idobject ID
ownerID of the owner of the object
line_styledrawing style of lines of shapes
rred part of RGBA color
ggreen part of RGBA color
bblue part of RGBA color
aalpha part of RGBA color

Definition at line 303 of file visdisplay.cpp.


Member Function Documentation

void VisualDisplay2D::Circle::draw ( Cairo::RefPtr< Cairo::Context > &  cr) [virtual]

Draw shape to Cairo context.

This method shall be implemented by a shape to draw itself using the provided Cairo context.

Parameters:
crreference to Cairo context. Note that this is a reference bypassing the reference pointer. This is done for efficiency and with the assumption that this method is only called by VisualDisplay2D::draw() which itself has proper refptr handling.

Implements VisualDisplay2D::Shape.

Definition at line 317 of file visdisplay.cpp.


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