Inherited by IpeFillable, IpeImage, IpeReference, and IpeText.
All Ipe objects are derived from this class. It provides functionality common to all objects, and carries the standard attributes.
All IpeObject's provide a constant time copy constructor (and a virtual IpeObject::Clone() method). Objects of non-constant size realize this by separating the implementation and using reference counting. In particular, copying a composite objects does not create new copies of the components.
The common attributes are stroke and fill color, line style and width, and the transformation matrix for coordinates.
IpeObject::~IpeObject | ( | ) | [pure virtual] |
Pure virtual destructor.
IpeObject::IpeObject | ( | ) | [explicit, protected] |
Create object with null stroke and identity matrix.
IpeObject::IpeObject | ( | const IpeAllAttributes & | attr | ) | [explicit, protected] |
Create object by taking stroke color from attr and setting identity matrix.
IpeObject::IpeObject | ( | IpeRepository * | rep, | |
const IpeXmlAttributes & | attr | |||
) | [explicit, protected] |
Construct from XML stream.
IpeObject::IpeObject | ( | const IpeObject & | rhs | ) | [protected] |
Copy constructor.
virtual void IpeObject::Accept | ( | IpeVisitor & | visitor | ) | const [pure virtual] |
virtual IpeObject* IpeObject::Clone | ( | ) | const [pure virtual] |
IpeFillable * IpeObject::AsFillable | ( | ) | [virtual] |
IpeGroup * IpeObject::AsGroup | ( | ) | [virtual] |
IpeText * IpeObject::AsText | ( | ) | [virtual] |
IpeMark * IpeObject::AsMark | ( | ) | [virtual] |
IpePath * IpeObject::AsPath | ( | ) | [virtual] |
IpeImage * IpeObject::AsImage | ( | ) | [virtual] |
IpeReference * IpeObject::AsReference | ( | ) | [virtual] |
TPinned IpeObject::pinned | ( | ) | const [inline] |
void IpeObject::setPinned | ( | TPinned | pin | ) |
Set pinning mode of the object.
virtual void IpeObject::SaveAsXml | ( | IpePainter & | painter, | |
IpeStream & | stream, | |||
IpeString | layer | |||
) | const [pure virtual] |
virtual void IpeObject::Draw | ( | IpePainter & | painter | ) | const [pure virtual] |
Extend box to include the object transformed by m.
For Ipe objects in a page, don't call this directly. The IpePgObject caches the bounding box, so it is far more efficient to call IpePgObject::BBox.
If called with an empty box, the result of this function is a tight bounding box for the object, with a little leeway in case the boundary is determined by a spline (it has to be approximated to perform this operation).
Implemented in IpeGroup, IpeImage, IpeMark, IpePath, IpeReference, and IpeText.
void IpeObject::AddToGraphicBBox | ( | IpeRect & | box, | |
IpeStyleSheet * | sheet, | |||
IpeMatrix & | m | |||
) | const [virtual] |
Extend box to include the graphic representation of the object.
Unlike AddToBBox, this function takes into account the graphic representation of the object, that is, its line width, arrow size, mark size, etc. The default implementation calls AddToBBox.
void IpeObject::CheckStyle | ( | const IpeStyleSheet * | sheet, | |
IpeAttributeSeq & | seq | |||
) | const [virtual] |
Check symbolic attributes of object.
Reimplemented in IpeGroup, IpeMark, IpeFillable, IpePath, IpeReference, and IpeText.
void IpeObject::SnapBnd | ( | const IpeVector & | mouse, | |
const IpeMatrix & | m, | |||
IpeVector & | pos, | |||
double & | bound | |||
) | const [virtual] |
Compute boundary snapping position for transformed object.
Looks only for positions closer than bound. If successful, modify pos and bound. The default implementation does nothing.
Reimplemented in IpeGroup, IpePath, and IpeReference.
void IpeObject::SetStroke | ( | IpeAttribute | stroke | ) |
Set stroke color.
void IpeObject::SetMatrix | ( | const IpeMatrix & | matrix | ) |
Set the transformation matrix.
Don't use this on the IpeObject in an IpePgObject, because it wouldn't invalidate its bounding box. Call IpePgObject::Transform instead.
IpeAttribute IpeObject::Stroke | ( | ) | const [inline] |
Return object stroke color.
const IpeMatrix & IpeObject::Matrix | ( | ) | const [inline] |
Return transformation matrix.
void IpeObject::SaveAttributesAsXml | ( | IpePainter & | painter, | |
IpeStream & | stream, | |||
IpeString | layer | |||
) | const [protected] |
Write layer, stroke and matrix to XML stream.