Public Member Functions

hipp::HippEllipse Class Reference
[SVG Shapes]

Abstract base class for circles and ellipses in Hipp. More...

#include <HippEllipse.h>

Inheritance diagram for hipp::HippEllipse:
hipp::HippShape

List of all members.

Public Member Functions

 HippEllipse (void)
 ~HippEllipse (void)
void LoadObject (const xercesc::Attributes &attrs, const XMLCh *const localname=XMLString::transcode("ellipse"))
 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 HippEllipseclone () const
void move (int diffX, int diffY)
void zoom (double scaleX, double scaleY)
wxPoint getCenter ()
int getXRadius ()
int getYRadius ()
void setCenter (int x, int y)
void setRadius (int rx, int ry)

Detailed Description

Abstract base class for circles and ellipses in Hipp.

Author:
Delphine Szymczak

Shapes are the building blocks of Hipp documents. They know how to represent themselves in the .svg xml format (HippShape::LoadObject and HippShape::SaveObject) and in the HippView (HippShape::OnDraw). Circles are one kind of shape.

Todo:

Create shapes for Path, etc.

Figure out how to properly import and convert Path objects that are really shapes


Constructor & Destructor Documentation

HippEllipse::HippEllipse ( void   ) 
HippEllipse::~HippEllipse ( void   ) 

Member Function Documentation

HippEllipse * HippEllipse::clone (  )  const [virtual]

Implements hipp::HippShape.

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

Implements hipp::HippShape.

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

Implements hipp::HippShape.

wxPoint HippEllipse::getCenter (  ) 
ShapeType HippEllipse::getShapeType (  )  [virtual]

Implements hipp::HippShape.

int HippEllipse::getXRadius (  ) 
int HippEllipse::getYRadius (  ) 
void hipp::HippEllipse::LoadObject ( const xercesc::Attributes &  attrs,
const XMLCh *const   localname = XMLString::transcode("ellipse") 
) [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 HippEllipse::move ( int  diffX,
int  diffY 
) [virtual]

Implements hipp::HippShape.

void HippEllipse::OnDraw ( Cairo::RefPtr< Cairo::Context >  context,
bool  isHaptic = true 
) const [virtual]

Reimplemented from hipp::HippShape.

ostream & HippEllipse::SaveObject ( ostream &  stream  ) 
void HippEllipse::setCenter ( int  x,
int  y 
)
void HippEllipse::setRadius ( int  rx,
int  ry 
)
void HippEllipse::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