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 |
Return in image an 1-bit-per-pixel DeviceGray image representation of this shape. More... | |
virtual IDOMPathGeometryPtr | getAsGeometry (IEDLClassFactory *factory) const =0 |
Get the shape as path geometry. More... | |
virtual FRect | getBounds () const =0 |
Get the bounds (in pixels) of the shape. More... | |
virtual float | getResolution () const =0 |
Get the resolution of the shape. More... | |
virtual bool | getIsEmpty () const =0 |
Detect an empty shape. More... | |
virtual bool | getIsRect () const =0 |
Detect if a shape is a rectangle. More... | |
virtual bool | isEqualTo (const IDOMShapePtr &ptrShape) const =0 |
Check this shape for equality to another shape. More... | |
virtual void | unite (const IDOMShapePtr &ptrShape)=0 |
Unite this shape with another. More... | |
virtual void | intersect (const IDOMShapePtr &ptrShape)=0 |
Reduce this shape to its intersection with another shape. More... | |
virtual void | difference (const IDOMShapePtr &ptrShape)=0 |
Reduce this shape by subtracting another shape. More... | |
virtual void | offset (int32 offsetX, int32 offsetY)=0 |
Offset the shape by the given numbers of pixels. More... | |
virtual bool | intersects (const IDOMShapePtr &ptrShape) const =0 |
Detect if this shape intersects with another. More... | |
virtual bool | completelyContainsShape (const IDOMShapePtr &ptrShape) const =0 |
Detect if another shape fits completely inside this shape. More... | |
virtual CShapeDetails | getShapeDetails () const =0 |
Fetch the regions that comprise the shape. More... | |
Public Member Functions inherited from IEDLObject | |
virtual const CClassID & | getClassID () const =0 |
Returns class ID of IEDLObject. More... | |
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. More... | |
virtual bool | clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory) |
Create a copy of EDLObject. More... | |
Public Member Functions inherited from IRCObject | |
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. More... | |
virtual int32 | getRefCount () const =0 |
Retrieve the current reference count of the actual object pointed to. More... | |
Static Public Member Functions | |
static const CClassID & | classID () |
Retrieves class id of IDOMShape. More... | |
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 | |
Protected Member Functions inherited from IRCObject | |
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. |
|
pure virtual |
Reduce this shape by subtracting another shape.
[in] | ptrShape | The shape to subtract. |
|
pure virtual |
Get the shape as path geometry.
Take care when using this API as it may generate very complex geometry, as the generated geometry will consist of rectangles representing the spans encoded in the shape, For complex shapes with many spans, this geometry can become very large.
factory | The factory to use. |
|
pure virtual |
Return in image
an 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.
|
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. |