Abstract base class for backgrounds in Hipp. More...
#include <HippBackground.h>
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 HippBackground * | clone () const |
| void | move (int diffX, int diffY) |
| void | zoom (double scaleX, double scaleY) |
Abstract base class for backgrounds in Hipp.
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.
Create shapes for Ellipse, Rectangle, Path, etc.
Figure out how to properly import and convert Path objects that are really shapes
| HippBackground::HippBackground | ( | string | imagePath | ) |
| HippBackground::~HippBackground | ( | void | ) |
| 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.
1.7.1