Interface to an IDOMShape. More...
#include <idomshape.h>
Classes | |
class | CShapeDetails |
Provides a view into the regions that comprise the shape. A region consists of a series of spans, each representing a series of rectangles that share the same y span. More... | |
class | Data |
Initialization data. More... | |
Public Member Functions | |
virtual IDOMImagePtr | getAsImage (const ISessionPtr &session, bool bUseTempFileForImage) const =0 |
Generate a 1-bit-per-pixel DeviceGray image representation of this shape. | |
virtual IDOMPathGeometryPtr | getAsGeometry (IEDLClassFactory *factory) const =0 |
Get the shape as path geometry. | |
virtual FRect | getBounds () const =0 |
Get the bounds (in pixels) of the shape. The bounds is always integral. | |
virtual IntRect | getIntBounds () const =0 |
Get the bounds (in pixels) of the shape as an integer rect. | |
virtual float | getResolution () const =0 |
Get the resolution of the shape. | |
virtual bool | getIsEmpty () const =0 |
Detect an empty shape. | |
virtual bool | getIsRect () const =0 |
Detect if a shape is a rectangle. | |
virtual bool | isEqualTo (const IDOMShapePtr &ptrShape) const =0 |
Check this shape for equality to another shape. | |
virtual void | unite (const IDOMShapePtr &ptrShape)=0 |
Unite this shape with another. | |
virtual void | intersect (const IDOMShapePtr &ptrShape)=0 |
Reduce this shape to its intersection with another shape. | |
virtual void | difference (const IDOMShapePtr &ptrShape)=0 |
Reduce this shape by subtracting another shape. | |
virtual void | offset (int32 offsetX, int32 offsetY)=0 |
Offset the shape by the given numbers of pixels. | |
virtual bool | intersects (const IDOMShapePtr &ptrShape) const =0 |
Detect if this shape intersects with another. | |
virtual bool | completelyContainsShape (const IDOMShapePtr &ptrShape) const =0 |
Detect if another shape fits completely inside this shape. | |
virtual CShapeDetails | getShapeDetails () const =0 |
Fetch the regions that comprise the shape. | |
![]() | |
virtual const CClassID & | getClassID () const =0 |
Returns class ID of IEDLObject. | |
virtual bool | init (CClassParams *pData) |
The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory. | |
virtual bool | clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory) |
Create a copy of EDLObject. | |
![]() | |
virtual void | addRef () const =0 |
Increases the reference count of the actual object pointed to. This would take place during an assignment or copying. | |
virtual bool | decRef () const =0 |
Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. | |
virtual int32 | getRefCount () const =0 |
Retrieve the current reference count of the actual object pointed to. | |
![]() | |
virtual | ~IDOMHashable () |
Virtual destructor. | |
virtual bool | hash (uint64 &hash)=0 |
Retrieve a hash for this object. | |
virtual uint64 | hashE () |
As hash(), but throws an exception if the operation fails. | |
Static Public Member Functions | |
static const CClassID & | classID () |
Retrieves class id of IDOMShape. | |
static EDL_API IDOMShapePtr | createRect (IEDLClassFactory *pFactory, float resolution, const FRect &rect) |
Create a rectangular shape. | |
static EDL_API IDOMShapePtr | createRectPixels (IEDLClassFactory *pFactory, float resolution, const IntRect &rect) |
As per createRect(), but the rectangle is pixels. The shape will be tagged with the given resolution, however the dimensions of the shape will not change. | |
Additional Inherited Members | |
![]() | |
virtual | ~IRCObject () |
Virtual destructor. | |
Interface to an IDOMShape.
A shape describes a scan-converted path. That is, a path that has been scanned to find which pixels would be affected by the path.
This is useful for a number of things. Once a shape has been made from a path it may be compared to other shapes to test for things like intersection and occulsion using higher accuracy than can be obtained by simply comparing bounding boxes.
A shape may be compared only with another shape scan-converted at the same resolution.
As of current this interface does not allow access to the low level details of the scan converted result. Rather it is intended to allow for simple comparisons.
|
inlinestatic |
|
pure virtual |
Detect if another shape fits completely inside this shape.
[in] | ptrShape | The shape to test. |
|
static |
Create a rectangular shape.
pFactory | The EDL Class factory to use. |
resolution | The resolution in dpi |
rect | The shape's size |
|
static |
As per createRect(), but the rectangle is pixels. The shape will be tagged with the given resolution, however the dimensions of the shape will not change.
pFactory | The EDL Class factory to use. |
resolution | The resolution in dpi |
rect | The shape's size |
|
pure virtual |
Reduce this shape by subtracting another shape.
[in] | ptrShape | The shape to subtract. |
|
pure virtual |
Get the shape as path geometry.
factory | The EDL Class factory to use. |
|
pure virtual |
Generate a 1-bit-per-pixel DeviceGray image representation of this shape.
[in] | session | The current session. |
[in] | bUseTempFileForImage | If true, the method creates a temporary file (the lifecycle of which Mako manages itself) to store the underlying image data in. If false, it uses an in-memory stream to store the image data. Client code can determine the size of the image that will be created using this class's getBounds() method, and choose which value to send for this flag. Note that as the image returned is 1 bit per pixel, the number of bytes required to store an image is the product of the bounds divided by the size of a byte. |
|
pure virtual |
Get the bounds (in pixels) of the shape. The bounds is always integral.
|
pure virtual |
Get the bounds (in pixels) of the shape as an integer rect.
|
pure virtual |
Detect an empty shape.
|
pure virtual |
Detect if a shape is a rectangle.
|
pure virtual |
Get the resolution of the shape.
|
pure virtual |
Fetch the regions that comprise the shape.
|
pure virtual |
Reduce this shape to its intersection with another shape.
[in] | ptrShape | The shape with which to intersect. |
|
pure virtual |
Detect if this shape intersects with another.
[in] | ptrShape | The shape to test with. |
|
pure virtual |
Check this shape for equality to another shape.
[in] | ptrShape | The shape to compare. |
|
pure virtual |
Offset the shape by the given numbers of pixels.
offsetX | The number of pixels to offset in x |
offsetY | The number of pixels to offset in y |
|
pure virtual |
Unite this shape with another.
[in] | ptrShape | The shape with which to unite. |