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

A drop or leaf item. More...

#include <path.h>

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

Public Member Functions

 Path (Canvas *canvas, GOPath *path)
 
 Path (Group *parent, GOPath *path, ItemClient *client=NULL)
 
virtual ~Path ()
 
double Distance (double x, double y, Item **item) const
 
void Draw (cairo_t *cr, bool is_vector) const
 
- Public Member Functions inherited from gccv::FillItem
 FillItem (Canvas *canvas)
 
 FillItem (Group *parent, ItemClient *client=NULL)
 
virtual ~FillItem ()
 
GOColor GetEffectiveFillColor () const
 
void SetFillColor (GOColor val)
 
GOColor GetFillColor (void) const
 
void SetAutoFillColor (bool val)
 
bool GetAutoFillColor (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

A drop or leaf item.

The Path item is made of line and curved segments.

Definition at line 41 of file path.h.

Constructor & Destructor Documentation

§ Path() [1/2]

gccv::Path::Path ( Canvas canvas,
GOPath *  path 
)
Parameters
canvasa Canvas.
paththe path to display.

Creates a new Path and sets it as a child of the root Group of canvas. It absorbs a reference for path.

§ Path() [2/2]

gccv::Path::Path ( Group parent,
GOPath *  path,
ItemClient client = NULL 
)
Parameters
parentthe Group to which the new Leaf will be added.
paththe path to display.
clientthe ItemClient for the new Path if any.

Creates a new Path inside parent and sets client as its associated ItemClient. It absorbs a reference for path.

§ ~Path()

virtual gccv::Path::~Path ( )
virtual

The destructor.

Member Function Documentation

§ Distance()

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

Reimplemented from gccv::Item.

§ Draw()

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

Draws the Path to cr.

Reimplemented from gccv::Item.

§ UpdateBounds()

void gccv::Path::UpdateBounds ( )
protectedvirtual

Evaluates the Path bounds.

Reimplemented from gccv::Item.


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