![]() | InDesign SDK 20.5 |
#include <IPreflightArtworkMarkInfo.h>

Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTARTWORKMARKINFO } |
| enum | MarkOperation { kMarkOp_Invalid, kMarkOp_Stroke, kMarkOp_Fill } |
| enum | MarkType { kMarkType_Invalid, kMarkType_Text, kMarkType_Path } |
| enum | MarkPointType { kMarkPt_Invalid, kMarkPt_MoveTo, kMarkPt_LineTo, kMarkPt_CurveTo, kMarkPt_Close } |
Public Member Functions | |
| virtual IPreflightArtworkPaintInfo * | QueryColorPaintInfo () const =0 |
| virtual IPreflightArtworkPaintInfo * | QueryAlphaPaintInfo () const =0 |
| virtual IPreflightArtworkTextInfo * | QueryTextInfo () const =0 |
| virtual void | GetBounds (PMRect &r, const PMMatrix &m=PMMatrix()) const =0 |
| virtual bool | GetOverprint () const =0 |
| virtual MarkType | GetMarkType () const =0 |
| virtual MarkOperation | GetMarkOperation () const =0 |
| virtual PMReal | GetStrokeWidth () const =0 |
| virtual uint32 | GetPathPoints (PMPoint *locs=nil, MarkPointType *ptTypes=nil) const =0 |
| virtual void | GetAbsoluteMatrix (PMMatrix &m) const =0 |
| virtual void | GetPathMatrix (PMMatrix &m) const =0 |
| virtual bool | IsFromPattern () const =0 |
| virtual IPreflightArtworkImage * | Rasterize (const PMMatrix &path2image=PMMatrix(), uint32 rf_flags=IPreflightArtworkImage::kRF_Default) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface provides information about a particular marking operation. This is used by rule implementations (ie in IPreflightRuleVisitor::Visit()) that ask to look at objects of class kPreflightOM_ArtworkMark. When you're given an object of that class, use this interface to inspect it further.
Typical usage (this example from the registration color rule):
InterfacePtr<IPreflightObject> iObj(iVisit->QueryObject());
InterfacePtr<IPreflightArtworkMarkInfo> iMark(iObj, UseDefaultIID());
InterfacePtr<IPreflightArtworkPaintInfo> iColor(iMark->QueryColorPaintInfo());
if (!iColor) return;
InterfacePtr<IPreflightArtworkCSInfo> iCS(iColor->QueryColorSpace());
if (!iCS) return;
if (iCS->GetType() == IPreflightArtworkCSInfo::kCS_Indexed)
{
iCS = InterfacePtr<IPreflightArtworkCSInfo>(iCS->QueryBase());
}
if ((iCS->GetType() == IPreflightArtworkCSInfo::kCS_NChannel
|| iCS->GetType() == IPreflightArtworkCSInfo::kCS_DeviceN)
&& iCS->GetRegistrationChannelsMap().size() > 0)
{
InterfacePtr<IPreflightResultRecord> iRecord(iVisit->CreateResultRecord());
iRecord->SetCriteria(kPreflightRC_Default);
Which kind of marking operation this is.
| pure virtual |
Get the absolute matrix, ie the cumulative matrix from here to 72dpi page space. Useful for determining the absolute size/resolution of things taking into account any group or page item scaling.
| m | OUT Receives the matrix. |
| pure virtual |
Get the bounds of the marking operation. The bounds are in path coordinates, or you can pass a particular matrix that you want to use if you want the bounds computed in that space (the points are xformed so this is more accurate than xforming the rect).
| r | OUT Receives the bounding box. |
| m | IN Optionally a matrix to xform the points through before calculating bbox. |
| pure virtual |
Returns whether the marking operation is stroke or fill.
| pure virtual |
Returns the shape of the mark – path vs text.
| pure virtual |
Returns whether overprint is currently enabled.
| pure virtual |
Get the path matrix, ie the matrix that applies to the points in the path.
| m | OUT Receives the path matrix. |
| pure virtual |
Get the point data for the path for the marking operation.
| locs | OUT If non-nil, receives the locations (in CTM coords). |
| ptTypes | OUT If non-nil, receives the point types. |
| pure virtual |
Get the stroke width (applicable to stroke operations).
| pure virtual |
Determines whether this marking operation is part of an expanded pattern.
| pure virtual |
Get the alpha paint information.
| pure virtual |
Get the color paint information.
| pure virtual |
Get the interface that describes the text/font information. This returns non-nil only for marking operations of type kMarkType_Text.
| pure virtual |
Build an image of the mark.
Be careful with this one, in particular with images; in many cases, large images are virtual and do not incur much inspection cost UNLESS you want the pixels, which of course this method does. Therefore for images this can be a very expensive call.
This method returns a refcounted image object which you need to release. Note that since it's IPMUnknown based you can use InterfacePtr. The image is completely independent from this marking operation; you can keep it as long as you like.
The image is (for now) always built in the colorspace of the marking operation. For example if this is an RGB marking operation it will be an RGB image; if it is CMYK plus some spots the image will be CMYK plus spot plates.
| matrix | The matrix to use to get from path matrix space to image space. If you pass a unity matrix then there will be a 1:1 mapping from GetBounds() to pixels. If you pass a 2x scale matrix then each Bounds() unit maps to two image pixels. And so on. Use this matrix to establish the effective resolution and origin of the image. The image will have minimum padding outside of the path bounds (generally only enough to accommodate antialiasing bleed). |
| alpha | True if you want the image to have alpha; false if not. Alpha is useful for determining what is marked, as opposed to what's white. |