Public Member Functions

hipp::HippBackground Class Reference
[SVG Shapes]

Abstract base class for backgrounds in Hipp. More...

#include <HippBackground.h>

Inheritance diagram for hipp::HippBackground:
hipp::HippShape

List of all members.

Public Member Functions

 HippBackground (string imagePath)
 ~HippBackground (void)
void LoadObject (const xercesc::Attributes &attrs, const XMLCh *const localname=XMLString::transcode("background"))
 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) const
virtual HippBackgroundclone () const
void move (int diffX, int diffY)
void zoom (double scaleX, double scaleY)

Detailed Description

Abstract base class for backgrounds in Hipp.

Author:
Magnus Espersson

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). Backgrounds are one kind of shape.

Todo:

Create shapes for Ellipse, Rectangle, Path, etc.

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


Constructor & Destructor Documentation

HippBackground::HippBackground ( string  imagePath  ) 
HippBackground::~HippBackground ( void   ) 

Member Function Documentation

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

Implements hipp::HippShape.

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

Implements hipp::HippShape.

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

Implements hipp::HippShape.

ShapeType hipp::HippBackground::getShapeType (  )  [inline, virtual]

Implements hipp::HippShape.

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

Implements hipp::HippShape.

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

Reimplemented from hipp::HippShape.

ostream & HippBackground::SaveObject ( ostream &  stream  ) 
void HippBackground::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