Public Member Functions

hipp::HippPolyline Class Reference

#include <HippPolyline.h>

Inheritance diagram for hipp::HippPolyline:
hipp::HippShape

List of all members.

Public Member Functions

 HippPolyline (void)
 ~HippPolyline (void)
void LoadObject (const xercesc::Attributes &attrs, const XMLCh *const localname=XMLString::transcode("polyline"))
 Loads the shape from a set of SVG attributes and the SVG tag name, provided by Xerces-C.
ostream & SaveObject (ostream &stream)
ShapeType getShapeType ()
const wxRect & getBounds () const
bool containsPoint (wxPoint p) const
void OnDraw (Cairo::RefPtr< Cairo::Context > context, bool isHaptic=true) const
virtual HippPolylineclone () const
void move (int diffX, int diffY)
void zoom (double scaleX, double scaleY)
void addPoint (wxPoint *p)
void addPoints (vector< wxPoint * > points)
void simplify ()
vector< wxPoint * > getPoints ()
bool pointInPolygon (int x, int y) const

Constructor & Destructor Documentation

HippPolyline::HippPolyline ( void   ) 
HippPolyline::~HippPolyline ( void   ) 

Member Function Documentation

void HippPolyline::addPoint ( wxPoint *  p  ) 
void HippPolyline::addPoints ( vector< wxPoint * >  points  ) 
Todo:
Recode this so that points are stored in heaps to determine bounds
HippPolyline * HippPolyline::clone (  )  const [virtual]

Implements hipp::HippShape.

bool HippPolyline::containsPoint ( wxPoint  p  )  const [virtual]

Implements hipp::HippShape.

const wxRect & HippPolyline::getBounds (  )  const [virtual]

Implements hipp::HippShape.

vector<wxPoint *> hipp::HippPolyline::getPoints (  )  [inline]
ShapeType hipp::HippPolyline::getShapeType (  )  [inline, virtual]

Implements hipp::HippShape.

void hipp::HippPolyline::LoadObject ( const xercesc::Attributes &  attrs,
const XMLCh *const   localname = XMLString::transcode("polyline") 
) [virtual]

Loads the shape from a set of SVG attributes and the SVG tag name, provided by Xerces-C.

Hipp uses a Xerces-C SAX2 XML parser to traverse a .svg input file. When a known shape is encountered, LoadObject is called with the attributes that are found. The HippShape implementation checks for <title> and <desc> tags, which are universally available to shapes. This function should be overridden in derived classes to load the appropriate object.

Reimplemented from hipp::HippShape.

void HippPolyline::move ( int  diffX,
int  diffY 
) [virtual]

Implements hipp::HippShape.

void HippPolyline::OnDraw ( Cairo::RefPtr< Cairo::Context >  context,
bool  isHaptic = true 
) const [virtual]
Todo:
: Make this use dc->DrawPoint(point) instead.

Reimplemented from hipp::HippShape.

bool HippPolyline::pointInPolygon ( int  x,
int  y 
) const
ostream & HippPolyline::SaveObject ( ostream &  stream  ) 
void HippPolyline::simplify (  ) 
void HippPolyline::zoom ( double  scaleX,
double  scaleY 
) [virtual]

Implements hipp::HippShape.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines