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

An arc item. More...

#include <arc.h>

Inheritance diagram for gccv::Arc:
gccv::LineItem gccv::Item

Public Member Functions

 Arc (Canvas *canvas, double xc, double yc, double radius, double start, double end)
 
 Arc (Group *parent, double xc, double yc, double radius, double start, double end, ItemClient *client=NULL)
 
virtual ~Arc ()
 
double Distance (double x, double y, Item **item) const
 
void Draw (cairo_t *cr, bool is_vector) const
 
void SetX (double val)
 
double GetX (void) const
 
void SetY (double val)
 
double GetY (void) const
 
void SetRadius (double val)
 
double GetRadius (void) const
 
void SetStart (double val)
 
double GetStart (void) const
 
void SetHead (ArrowHeads val)
 
ArrowHeads GetHead (void) const
 
void SetA (double val)
 
double GetA (void) const
 
void SetB (double val)
 
double GetB (void) const
 
void SetC (double val)
 
double GetC (void) const
 
- Public Member Functions inherited from gccv::LineItem
 LineItem (Canvas *canvas)
 
 LineItem (Group *parent, ItemClient *client=NULL)
 
virtual ~LineItem ()
 
GOColor GetEffectiveLineColor () const
 
bool 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
 
virtual void Move (double x, double y)
 
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 ()
 
- Protected Member Functions inherited from gccv::Item
void BoundsChanged ()
 
Canvas const * GetCanvas () const
 

Additional Inherited Members

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

Detailed Description

An arc item.

The Arc item is a circular arc.

Definition at line 40 of file arc.h.

Constructor & Destructor Documentation

gccv::Arc::Arc ( Canvas canvas,
double  xc,
double  yc,
double  radius,
double  start,
double  end 
)
Parameters
canvasa Canvas.
xcthe arc center horizontal position.
ycthe arc center vertical position.
radiusthe arc radius.
startthe arc start angle.
endthe arc end angle.

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

gccv::Arc::Arc ( Group parent,
double  xc,
double  yc,
double  radius,
double  start,
double  end,
ItemClient client = NULL 
)
Parameters
parentthe Group to which the new Leaf will be added.
xcthe arc center horizontal position.
ycthe arc center vertical position.
radiusthe arc radius.
startthe arc start angle.
endthe arc end angle.
clientthe ItemClient for the new Arc if any.

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

virtual gccv::Arc::~Arc ( )
virtual

The destructor.

Member Function Documentation

double gccv::Arc::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 Arc class. Sets item to this.

Reimplemented from gccv::Item.

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

Draws the Arc to cr.

Reimplemented from gccv::Item.

gccv::Arc::GetA ( void  ) const
inline
Returns
the distance from tip of arrowhead to center.

Definition at line 164 of file arc.h.

gccv::Arc::GetB ( void  ) const
inline
Returns
the distance from tip of arrowhead to trailing point, measured along shaft.

Definition at line 174 of file arc.h.

gccv::Arc::GetC ( void  ) const
inline
Returns
the distance of arrowhead trailing points from outside edge of shaft.

Definition at line 183 of file arc.h.

gccv::Arc::GetHead ( void  ) const
inline
Returns
the ArrowHeads for the end position of the arc.

Definition at line 155 of file arc.h.

gccv::Arc::GetRadius ( void  ) const
inline
Returns
the arc radius.

Definition at line 125 of file arc.h.

gccv::Arc::GetStart ( void  ) const
inline
Returns
the arc start angle.
the arc end angle.

Definition at line 135 of file arc.h.

gccv::Arc::GetX ( void  ) const
inline
Returns
the arc center horizontal position.

Definition at line 105 of file arc.h.

gccv::Arc::GetY ( void  ) const
inline
Returns
the arc center vertical position.

Definition at line 115 of file arc.h.

gccv::Arc::SetA ( double  A)
inline
Parameters
Anew arrow head size parameter.

Sets the distance from tip of arrowhead to center.

Definition at line 164 of file arc.h.

gccv::Arc::SetB ( double  B)
inline
Parameters
Bnew arrow head size parameter.

Sets the distance from tip of arrowhead to trailing point, measured along shaft.

Definition at line 174 of file arc.h.

gccv::Arc::SetC ( double  C)
inline
Parameters
Cnew arrow head size parameter.

Sets the distance of arrowhead trailing points from outside edge of shaft.

Definition at line 183 of file arc.h.

gccv::Arc::SetHead ( ArrowHeads  Head)
inline
Parameters
Headthe ArrowHeads for the end position of the arc.

Sets the arrow head type at the segment end position.

Definition at line 155 of file arc.h.

gccv::Arc::SetRadius ( double  radius)
inline
Parameters
radiusthe new arc radius.

Sets the arc radius.

Definition at line 125 of file arc.h.

gccv::Arc::SetStart ( double  end)
inline
Parameters
startthe new arc start angle.

Sets the arc start angle.

Parameters
endthe new arc end angle.

Sets the arc end angle.

Definition at line 135 of file arc.h.

gccv::Arc::SetX ( double  x)
inline
Parameters
xthe new arc center horizontal position.

Sets the arc center horizontal position.

Definition at line 105 of file arc.h.

gccv::Arc::SetY ( double  y)
inline
Parameters
ythe new arc center vertical position.

Sets the arc center vertical position.

Definition at line 115 of file arc.h.

void gccv::Arc::UpdateBounds ( )
protectedvirtual

Evaluates the Arc bounds.

Reimplemented from gccv::Item.


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