Ipelib
|
#include <ipeimage.h>
Inherits ipe::Object.
Public Member Functions | |
Image (const Rect &rect, Bitmap bitmap) | |
Image (const XmlAttributes &attr, String data) | |
Image (const XmlAttributes &attr, Bitmap bitmap) | |
virtual Object * | clone () const |
virtual Image * | asImage () |
virtual Type | type () const |
virtual void | saveAsXml (Stream &stream, String layer) const |
virtual void | draw (Painter &painter) const |
virtual void | drawSimple (Painter &painter) const |
virtual void | accept (Visitor &visitor) const |
virtual double | distance (const Vector &v, const Matrix &m, double bound) const |
virtual void | addToBBox (Rect &box, const Matrix &m, bool) const |
virtual void | snapCtl (const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const |
Rect | rect () const |
Bitmap | bitmap () const |
![]() | |
virtual | ~Object ()=0 |
virtual Group * | asGroup () |
virtual const Group * | asGroup () const |
virtual Text * | asText () |
virtual Path * | asPath () |
virtual Reference * | asReference () |
virtual TPinned | pinned () const |
void | setPinned (TPinned pin) |
TTransformations | transformations () const |
void | setTransformations (TTransformations trans) |
void | setMatrix (const Matrix &matrix) |
const Matrix & | matrix () const |
virtual bool | setAttribute (Property prop, Attribute value) |
virtual Attribute | getAttribute (Property prop) const noexcept |
virtual void | snapVtx (const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const |
virtual void | snapBnd (const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const |
virtual void | checkStyle (const Cascade *sheet, AttributeSeq &seq) const |
Additional Inherited Members | |
![]() | |
enum | Type { EGroup, EPath, EText, EImage, EReference } |
![]() | |
Object () | |
Object (const AllAttributes &attr) | |
Object (const Object &rhs) | |
Object (const XmlAttributes &attr) | |
void | saveAttributesAsXml (Stream &stream, String layer) const |
![]() | |
static void | checkSymbol (Kind kind, Attribute attr, const Cascade *sheet, AttributeSeq &seq) |
![]() | |
Matrix | iMatrix |
TPinned | iPinned: 8 |
TTransformations | iTransformations: 8 |
The image object.
Create a new image.
Referenced by clone().
|
explicit |
Create from XML stream.
|
explicit |
Create from XML stream with given bitmap.
References ipe::Rect::addPoint(), ipe::Vector::x, and ipe::Vector::y.
|
virtual |
|
virtual |
Return pointer to this object.
Reimplemented from ipe::Object.
|
virtual |
Implements ipe::Object.
References ipe::Object::EImage.
Save image in XML stream.
Implements ipe::Object.
References ipe::Bitmap::objNum(), rect(), and ipe::Object::saveAttributesAsXml().
|
virtual |
Draw image.
Implements ipe::Object.
References ipe::Rect::bottomLeft(), ipe::Painter::drawBitmap(), ipe::Rect::height(), ipe::Object::matrix(), ipe::Painter::pop(), ipe::Painter::popMatrix(), ipe::Painter::push(), ipe::Painter::pushMatrix(), ipe::Painter::transform(), ipe::Object::transformations(), ipe::Painter::untransform(), ipe::Rect::width(), ipe::Vector::x, and ipe::Vector::y.
|
virtual |
Draw simple version for selecting and transforming.
Implements ipe::Object.
References ipe::Painter::drawPath(), ipe::EStrokedOnly, ipe::Object::matrix(), ipe::Painter::newPath(), ipe::Painter::popMatrix(), ipe::Painter::pushMatrix(), ipe::Painter::rect(), ipe::Painter::transform(), ipe::Object::transformations(), and ipe::Painter::untransform().
|
virtual |
Return distance of transformed object to point v. If larger than bound, can just return bound.
Implements ipe::Object.
References ipe::Rect::addPoint(), ipe::Rect::bottomLeft(), ipe::Rect::bottomRight(), ipe::Rect::certainClearance(), ipe::Object::matrix(), ipe::Rect::topLeft(), and ipe::Rect::topRight().
Extend box to include the object transformed by m.
For objects in a page, don't call this directly. The Page caches the bounding box of each object, so it is far more efficient to call Page::bbox.
Control points that lie outside the visual object are included if cp is true.
If called with an empty box and cp == false
, 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).
Implements ipe::Object.
References ipe::Rect::addPoint(), ipe::Rect::bottomLeft(), ipe::Rect::bottomRight(), ipe::Object::matrix(), ipe::Rect::topLeft(), and ipe::Rect::topRight().
|
virtual |
Compute control point snapping position for transformed object.
Looks only for positions closer than bound. If successful, modify pos and bound. The default implementation does nothing.
Reimplemented from ipe::Object.
References ipe::Rect::bottomLeft(), ipe::Rect::bottomRight(), ipe::Object::matrix(), ipe::Rect::topLeft(), and ipe::Rect::topRight().
|
inline |
Return the rectangle occupied by the image on the paper.
The transformation matrix is applied to this, of course.
Referenced by saveAsXml().
|
inline |
Return Bitmap of the image.
Referenced by ipe::BitmapFinder::visitImage().