gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
CairoArc Class Reference

#include <CairoArc.H>

Inheritance diagram for CairoArc:
[legend]

Public Member Functions

 CairoArc ()
 Empty constructor. More...
 
 CairoArc (cairo_t *cr, double x, double y, double radiusIn, double angleStart, double angleEnd, bool fillIn)
 
virtual ~CairoArc ()
 
void settings (double radiusIn, double angleStart, double angleEnd, bool fillIn)
 
void draw (cairo_t *cr, double x, double y, bool fillIn)
 
void draw (cairo_t *cr, double x, double y, double radiusIn)
 
void draw (cairo_t *cr, double x, double y, double radiusIn, bool fillIn)
 
void draw (cairo_t *cr, double x, double y, double angleStart, double angleEnd, bool fillIn)
 
void draw (cairo_t *cr, double x, double y, double radiusIn, double angleStart, double angleEnd)
 
void draw (cairo_t *cr, double x, double y, double radiusIn, double angleStart, double angleEnd, bool fillIn)
 
void draw (cairo_t *cr, double x, double y)
 
double getRadius ()
 
double getAngleStart ()
 
double getAngleEnd ()
 

Protected Attributes

double radius
 The radius of the circle. More...
 
double thetaStart
 
double thetaEnd
 The angles from start to end. More...
 
bool filled
 Whether to fill the box. More...
 

Detailed Description

Given a Cairo context, draw an arc. The arc is specified by a central point (x, y) the radius and a starting, ending angle and whether it is filled or not. Assumes that the Cairo context is already configured for line width and colour.

CairoArc.test.png
Examples:
CairoCircleTest.C.

Definition at line 36 of file CairoArc.H.

Constructor & Destructor Documentation

◆ CairoArc() [1/2]

CairoArc::CairoArc ( )
inline

Empty constructor.

Definition at line 43 of file CairoArc.H.

◆ CairoArc() [2/2]

CairoArc::CairoArc ( cairo_t *  cr,
double  x,
double  y,
double  radiusIn,
double  angleStart,
double  angleEnd,
bool  fillIn 
)
inline

Constructor which draws an arc at a particular location. This constructor also stores the various member variables for radius, angle and fill state.

Parameters
xThe x location to draw use as the center.
yThe y location to draw use as the center.
radiusInThe radius to draw the arc to.
angleStartThe starting angle
angleEndThe ending angle
boolfillIn Whether the fill or not.

Definition at line 59 of file CairoArc.H.

Here is the call graph for this function:

◆ ~CairoArc()

virtual CairoArc::~CairoArc ( )
inlinevirtual

Definition at line 63 of file CairoArc.H.

Member Function Documentation

◆ draw() [1/7]

void CairoArc::draw ( cairo_t *  cr,
double  x,
double  y,
bool  fillIn 
)
inline

Draw the arc at a particular location.

Parameters
xThe x location to draw use as the center.
yThe y location to draw use as the center.
boolfillIn Whether the fill or not.
Examples:
CairoCircleTest.C.

Definition at line 82 of file CairoArc.H.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw() [2/7]

void CairoArc::draw ( cairo_t *  cr,
double  x,
double  y,
double  radiusIn 
)
inline

Draw the arc at a particular location.

Parameters
xThe x location to draw use as the center.
yThe y location to draw use as the center.
radiusInThe radius to draw the arc to.

Definition at line 92 of file CairoArc.H.

Here is the call graph for this function:

◆ draw() [3/7]

void CairoArc::draw ( cairo_t *  cr,
double  x,
double  y,
double  radiusIn,
bool  fillIn 
)
inline

Draw the arc at a particular location.

Parameters
xThe x location to draw use as the center.
yThe y location to draw use as the center.
radiusInThe radius to draw the arc to.
boolfillIn Whether the fill or not.

Definition at line 103 of file CairoArc.H.

Here is the call graph for this function:

◆ draw() [4/7]

void CairoArc::draw ( cairo_t *  cr,
double  x,
double  y,
double  angleStart,
double  angleEnd,
bool  fillIn 
)
inline

Draw the arc at a particular location.

Parameters
xThe x location to draw use as the center.
yThe y location to draw use as the center.
angleStartThe starting angle
angleEndThe ending angle
boolfillIn Whether the fill or not.

Definition at line 115 of file CairoArc.H.

Here is the call graph for this function:

◆ draw() [5/7]

void CairoArc::draw ( cairo_t *  cr,
double  x,
double  y,
double  radiusIn,
double  angleStart,
double  angleEnd 
)
inline

Draw the arc at a particular location.

Parameters
xThe x location to draw use as the center.
yThe y location to draw use as the center.
radiusInThe radius to draw the arc to.
angleStartThe starting angle
angleEndThe ending angle

Definition at line 127 of file CairoArc.H.

Here is the call graph for this function:

◆ draw() [6/7]

void CairoArc::draw ( cairo_t *  cr,
double  x,
double  y,
double  radiusIn,
double  angleStart,
double  angleEnd,
bool  fillIn 
)
inline

Draw the arc at a particular location.

Parameters
xThe x location to draw use as the center.
yThe y location to draw use as the center.
radiusInThe radius to draw the arc to.
angleStartThe starting angle
angleEndThe ending angle
boolfillIn Whether the fill or not.

Definition at line 140 of file CairoArc.H.

Here is the call graph for this function:

◆ draw() [7/7]

void CairoArc::draw ( cairo_t *  cr,
double  x,
double  y 
)
inline

Draw the arc at a particular location.

Parameters
crThe cairo context to draw to.
xThe x location to draw use as the center.
yThe y location to draw use as the center.

Definition at line 150 of file CairoArc.H.

◆ getAngleEnd()

double CairoArc::getAngleEnd ( )
inline

Find the ending angle

Returns
The angle to stop drawing at.

Definition at line 178 of file CairoArc.H.

◆ getAngleStart()

double CairoArc::getAngleStart ( )
inline

Find the starting angle

Returns
The angle to start drawing from.

Definition at line 171 of file CairoArc.H.

◆ getRadius()

double CairoArc::getRadius ( )
inline

Find the radius

Returns
The radius currently used to draw with.

Definition at line 164 of file CairoArc.H.

◆ settings()

void CairoArc::settings ( double  radiusIn,
double  angleStart,
double  angleEnd,
bool  fillIn 
)
inline

Change the drawing settings.

Parameters
radiusInThe radius to draw the arc to.
angleStartThe starting angle
angleEndThe ending angle
boolfillIn Whether the fill or not.

Definition at line 71 of file CairoArc.H.

Here is the caller graph for this function:

Member Data Documentation

◆ filled

bool CairoArc::filled
protected

Whether to fill the box.

Definition at line 40 of file CairoArc.H.

◆ radius

double CairoArc::radius
protected

The radius of the circle.

Definition at line 38 of file CairoArc.H.

◆ thetaEnd

double CairoArc::thetaEnd
protected

The angles from start to end.

Definition at line 39 of file CairoArc.H.

◆ thetaStart

double CairoArc::thetaStart
protected

Definition at line 39 of file CairoArc.H.


The documentation for this class was generated from the following file:
gtkIOStream: CairoArc Class Reference
GTK+ IOStream  Beta