InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPreflightArtworkMarkInfo Class Referenceabstract

#include <IPreflightArtworkMarkInfo.h>

Inheritance diagram for IPreflightArtworkMarkInfo:
IPMUnknown

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 IPreflightArtworkTextInfoQueryTextInfo () 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 IPreflightArtworkImageRasterize (const PMMatrix &path2image=PMMatrix(), uint32 rf_flags=IPreflightArtworkImage::kRF_Default) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

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);

Member Enumeration Documentation

Which kind of marking operation this is.

The type of path; determines which APIs can be used below.
Enumerator
kMarkType_Text 

A text marking operation; use GetText* below.

kMarkType_Path 

A path (collection of points) marking operation; use GetPath* below.

Member Function Documentation

virtual void IPreflightArtworkMarkInfo::GetAbsoluteMatrix (PMMatrixm) const
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.

Parameters
mOUT Receives the matrix.
virtual void IPreflightArtworkMarkInfo::GetBounds (PMRectr,
const PMMatrixm = PMMatrix() 
) const
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).

Parameters
rOUT Receives the bounding box.
mIN Optionally a matrix to xform the points through before calculating bbox.
virtual MarkOperation IPreflightArtworkMarkInfo::GetMarkOperation () const
pure virtual

Returns whether the marking operation is stroke or fill.

Returns
The marking operation type.
virtual MarkType IPreflightArtworkMarkInfo::GetMarkType () const
pure virtual

Returns the shape of the mark – path vs text.

Returns
The marking type.
virtual bool IPreflightArtworkMarkInfo::GetOverprint () const
pure virtual

Returns whether overprint is currently enabled.

Returns
kTrue if overprint is on, kFalse otherwise.
virtual void IPreflightArtworkMarkInfo::GetPathMatrix (PMMatrixm) const
pure virtual

Get the path matrix, ie the matrix that applies to the points in the path.

Parameters
mOUT Receives the path matrix.
virtual uint32 IPreflightArtworkMarkInfo::GetPathPoints (PMPointlocs = nil,
MarkPointType * ptTypes = nil 
) const
pure virtual

Get the point data for the path for the marking operation.

Note
Applies iff GetMarkType() == kMarkType_Path.
Parameters
locsOUT If non-nil, receives the locations (in CTM coords).
ptTypesOUT If non-nil, receives the point types.
Returns
The number of points in the path.
virtual PMReal IPreflightArtworkMarkInfo::GetStrokeWidth () const
pure virtual

Get the stroke width (applicable to stroke operations).

Note
This is only valid if GetMarkOperation() == kMarkOp_Stroke.
Returns
The stroke width in CTM coordinates.
virtual bool IPreflightArtworkMarkInfo::IsFromPattern () const
pure virtual

Determines whether this marking operation is part of an expanded pattern.

Returns
kTrue if it's part of a pattern, kFalse otherwise.
virtual IPreflightArtworkPaintInfo* IPreflightArtworkMarkInfo::QueryAlphaPaintInfo () const
pure virtual

Get the alpha paint information.

Returns
A refcounted paint interface associated with the alpha data. This is a lightweight object with proper IPMUnknown semantics, but not a real boss. Will be nil if there is no alpha specification (ie the object is opaque).
virtual IPreflightArtworkPaintInfo* IPreflightArtworkMarkInfo::QueryColorPaintInfo () const
pure virtual

Get the color paint information.

Returns
A refcounted paint interface associated with the color data. This is a lightweight object with proper IPMUnknown semantics, but not a real boss. Could conceivably be nil.
virtual IPreflightArtworkTextInfo* IPreflightArtworkMarkInfo::QueryTextInfo () const
pure virtual

Get the interface that describes the text/font information. This returns non-nil only for marking operations of type kMarkType_Text.

Returns
A refcounted interface pointer, or nil if not applicable.
virtual IPreflightArtworkImage* IPreflightArtworkMarkInfo::Rasterize (const PMMatrixpath2image = PMMatrix(),
uint32 rf_flags = IPreflightArtworkImage::kRF_Default 
) const
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.

See Also
IPreflightArtworkImage.
Parameters
matrixThe 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).
alphaTrue 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.