The Gnome Chemistry Utils  0.14.0
Public Member Functions | Protected Member Functions | List of all members
gccv::Circle Class Reference

Circles. More...

#include <circle.h>

Inheritance diagram for gccv::Circle:
gccv::FillItem gccv::LineItem gccv::Item

Public Member Functions

 Circle (Canvas *canvas, double x, double y, double radius)
 Circle (Group *parent, double x, double y, double radius, ItemClient *client=NULL)
virtual ~Circle ()
void SetPosition (double x, double y)
void GetPosition (double &x, double &y)
double Distance (double x, double y, Item **item) const
void Draw (cairo_t *cr, bool is_vector) const
void Move (double x, double y)
void SetRadius (double val)
double GetRadius (void) const
- Public Member Functions inherited from gccv::FillItem
 FillItem (Canvas *canvas)
 FillItem (Group *parent, ItemClient *client=NULL)
virtual ~FillItem ()
void SetFillColor (GOColor val)
GOColor GetFillColor (void) const
- Public Member Functions inherited from gccv::LineItem
 LineItem (Canvas *canvas)
 LineItem (Group *parent, ItemClient *client=NULL)
virtual ~LineItem ()
GOColor GetEffectiveLineColor () const
void ApplyLine (cairo_t *cr) const
void SetDashes (double const *dashes, int num_dashes, double offset)
void SetLineWidth (double val)
double GetLineWidth (void) const
void SetLineColor (GOColor val)
GOColor GetLineColor (void) const
void SetAutoColor (bool val)
bool GetAutoColor (void) const
- Public Member Functions inherited from gccv::Item
 Item (Canvas *canvas)
 Item (Group *parent, ItemClient *client=NULL)
virtual ~Item ()
void GetBounds (double &x0, double &y0, double &x1, double &y1) const
void Invalidate () const
void SetVisible (bool visible)
virtual void BuildPath (cairo_t *cr) const
virtual bool Draw (cairo_t *cr, double x0, double y0, double x1, double y1, bool is_vector) const
bool IsTopLevel () const
void SetClient (ItemClient *val)
ItemClientGetClient (void)
Group const * GetParent (void) const
bool GetVisible (void) const
void SetOperator (cairo_operator_t val)
cairo_operator_t GetOperator (void) const

Protected Member Functions

void UpdateBounds ()

Additional Inherited Members

- Protected Attributes inherited from gccv::Item
double m_x0
double m_y0
double m_x1
double m_y1

Detailed Description

Circles.

Circle item.

Definition at line 39 of file circle.h.

Constructor & Destructor Documentation

gccv::Circle::Circle ( Canvas canvas,
double  x,
double  y,
double  radius 
)
Parameters
canvasa Canvas.
xthe circle center horizontal position.
ythe circle center vertical position.
radiusthe circle radius.

Creates a new Circle and sets it as a child of the root Group of canvas.

gccv::Circle::Circle ( Group parent,
double  x,
double  y,
double  radius,
ItemClient client = NULL 
)
Parameters
parentthe Group to which the new Circle will be added.
xthe circle center horizontal position.
ythe circle center vertical position.
radiusthe circle radius.
clientthe ItemClient for the new Circle if any.

Creates a new Circle inside parent and sets client as its associated ItemClient.

virtual gccv::Circle::~Circle ( )
virtual

The destructor.

Member Function Documentation

double gccv::Circle::Distance ( double  x,
double  y,
Item **  item 
) const
virtual
Parameters
xhorizontal position
yvertical position
itemwhere to store the Item.

Implementation of Item::Distance() for the Circle class. Sets item to this.

Reimplemented from gccv::Item.

void gccv::Circle::Draw ( cairo_t *  cr,
bool  is_vector 
) const
virtual
Parameters
cra cairo_t.
is_vectorwhether the cairo_t is a vectorial context.

Draws the Circle to cr.

Reimplemented from gccv::Item.

void gccv::Circle::GetPosition ( double &  x,
double &  y 
)
Parameters
xwhere to store the circle center horizontal position.
ywhere to store the circle center vertical position.

Retrieves the position of the circle center.

gccv::Circle::GetRadius ( void  ) const
inline
Returns
the circle radius.

Definition at line 123 of file circle.h.

void gccv::Circle::Move ( double  x,
double  y 
)
virtual
Parameters
xthe horizontal deplacement
ythe vertical deplacement

Moves the Circle.

Reimplemented from gccv::Item.

void gccv::Circle::SetPosition ( double  x,
double  y 
)
Parameters
xthe new circle center horizontal position.
ythe new circle center vertical position.

Sets the position of the circle center.

gccv::Circle::SetRadius ( double  radius)
inline
Parameters
radiusthe new circle radius.

Sets the circle radius.

Definition at line 123 of file circle.h.

void gccv::Circle::UpdateBounds ( )
protectedvirtual

Evaluates the Circle bounds.

Reimplemented from gccv::Item.


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