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

Public Types | |
| enum | { kDefaultIID = IID_IRASTERPORT } |
Public Member Functions | |
| virtual void | Setup ()=0 |
| virtual int32 | currentgstatelevel ()=0 |
| virtual void | initdevicescale (const PMReal scale=1.0)=0 |
| virtual PMReal | getdevicescale ()=0 |
| virtual void | setmatrix (const PMMatrix &m)=0 |
| virtual int8 | currentmatrix (PMMatrix *m)=0 |
| virtual PMReal | currentlinewidth ()=0 |
| virtual void | currentdash (int32 *numDash, Fixed **dashArray, Fixed *offset)=0 |
| virtual int32 | currentlinecap ()=0 |
| virtual int32 | currentlinejoin ()=0 |
| virtual PMReal | currentmiterlimit ()=0 |
| virtual void | currentfillbounds (PMRect *bounds)=0 |
| virtual void | currentstrokebounds (PMRect *bounds)=0 |
| virtual void | currentclipbounds (PMRect *bounds)=0 |
| virtual AGMPaint * | currentsrccolor ()=0 |
| virtual void | currentdstcolor (AGMRasterPort *dstDevice, AGMPaint *agmPaint)=0 |
| virtual int8 | infill (const PMRect &devRect)=0 |
| virtual int8 | ineofill (const PMRect &devRect)=0 |
| virtual int8 | instroke (const PMRect &devRect)=0 |
| virtual void | initclip ()=0 |
| virtual int8 | clipclass (const PMRect &rect)=0 |
| virtual bool8 | transform (PMReal *x, PMReal *y)=0 |
| virtual bool8 | itransform (PMReal *x, PMReal *y)=0 |
| virtual void | GetPathInfo (IOutlineInfo *callBack)=0 |
| virtual bool8 | GetError ()=0 |
| virtual void | SetXORMode (bool32 xorOn)=0 |
| virtual void | setantialiaspolicy (int32 *inOutPolicy)=0 |
| virtual void | setportoptions (uint32 portOptions)=0 |
| virtual uint32 | getportoptions ()=0 |
| virtual bool8 | SetDeviceProfile (AGMColorProfile *profile)=0 |
| virtual bool8 | IsHiDPI ()=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 is a viewport interface which is a shell over AGM's rasterport specific API Most of the methods work exactly or very similar to PostScript operators. See Postscript language reference manual for more info
IMPORTANT: You CANNOT use IRasterPort methods in any drawing code you expect to print
Note: Many of the methods exposed by IRasterPort use internal types and are intended for internal usage only.
| pure virtual |
Check to see if the provided rectangle is within the current clip path.
The rectangle provided is in user space and will be transformed to device space using the current CTM before comparing with device space clip in the gstate.
| rect | IN The rect to test |
| pure virtual |
Gets the backing port's current clip bounds in device coordinates (not user-coordinates). Note that even the device scale set by initdevicescale can be seen through currentclipbounds. So if you were to initdevicescale(2.0); then translate user space by (100, 100); then clip to L:0 T:0 R:10 B:10 and then asked for currentclipbounds, you would get L:200 T:200 R:220 B:220 – an answer in the coordinate system of the deep down unscaled device.
Also note that before a clip is ever set, AGM reports a wide open clip of +/- (2^30 - 2^7) of all the strange things. But the first clip will actually intersect the requested clip with the extent of the pixel bounds. For example:
gport->rectclip( -double(1UL<<29), -double(1UL<<29), double(1UL<<30), double(1UL<<30)); rport->currentclipbounds( &rect); //...we're now down to the pixel buffer.
will reveal the actual size of the pixel buffer (sneaking past the device scale factor set by initdevicescale.
| bounds | OUT The clip bounds |
| pure virtual |
Gets the backing port's current dash pattern
| numDash | OUT The number of dashes |
| dashArray | OUT The current dash array |
| offset | OUT The dash offset |
| pure virtual |
This method intentionally uncommented
| pure virtual |
Gets the backing port's current fill bounds
| bounds | OUT The fill bounds |
| pure virtual |
Returns the current gsave level in the backing port
| pure virtual |
Gets the backing port's current line cap. See GraphicTypes.h for possible return values
| pure virtual |
Gets the backing port's current line join. See GraphicTypes.h for possible return values
| pure virtual |
Gets the backing port's current line width
| pure virtual |
Gets the backing port's current user coord CTM if there is a device scale factor, the returned matrix will not include it
| m | OUT The current matrix |
| pure virtual |
Gets the backing port's current miter limit
| pure virtual |
Gets the backing port's current source color
| pure virtual |
Gets the backing port's current stroke bounds
| bounds | OUT The stroke bounds |
| pure virtual |
Gets the backing port's device coord scale factor
| pure virtual |
Gets backing port's error state
| pure virtual |
Gets the backing port's current path
| callBack | OUT The outline info to store the path |
| pure virtual |
This method intentionally uncommented
| pure virtual |
Tests whether the rectangle in device space would be painted by eofill, taking current clip into account
| devRect | IN The rect to test, in device coordinates |
| pure virtual |
Tests whether the rectangle in device space would be painted by fill, taking current clip into account
| devRect | IN The rect to test, in device coordinates |
| pure virtual |
Initializes the backing port's clipping
| pure virtual |
Sets the backing port's device coord scale factor. Note: For HiDPI offscreens set the device scale before setting the user matrix
What this does is make every currentmatrix, setmatrix call pass through this scale factor. With setmatrix, first the scale factor is put into the port, then the passed in matrix. With currentmatrix, the real CTM is post-unscaled before returning. That essentially means that there is a scale-factor stuck on the device that you can't see (except with currentclipbounds) or get rid of. So for example, if you create a double-size pixelbuffer for AGM and call initdevicescale(2.) on the raster port, all the existing AGM drawing code that uses setmatrix, currentmatrix will be drawing double-resolution pictures without knowing it.
| scale | IN The device coord scale factor (implicitly 1:1 unless an HiDPI mode is in effect) |
| pure virtual |
Tests whether the rectangle in device space would be painted by stroke, taking current clip into account
| devRect | IN The rect to test, in device coordinates |
| pure virtual |
Determines if the backing port is in high DPI mode (device scale == 2.0)
Transforms the given point by the inverse of the backing port's CTM (i.e. from device space to CTM space)
| x | IN/OUT The x component of the point |
| y | IN/OUT The y component of the point |
| pure virtual |
Sets the anti-aliasing policy for the backing port.
Returns previous policy. Allows use like this:
<pre>
int32 options = 1;
rasterport->setantialiaspolicy(&options);
use the port... rasterport->setantialiaspolicy(&options); // Restore previous value
inOutPolicy is a bit mask that can take one or more of the following: 1 to antialias text 2 to antialias graphics 4 prevents linearized blending for non-AGM alpha
| inOutPolicy | IN/OUT The new policy on input, the old policy on output |
| pure virtual |
Sets the device profile for the current raster port.
| profile | IN The profile to set |
| pure virtual |
Sets the backing port's user coord CTM to m if there is a device scale factor in effect, the matrix m should not include it
| m | IN The new matrix |
| pure virtual |
This method intentionally uncommented
| pure virtual |
Initializes the port. May be called multiple times to re-initialize the port if the backing port changes
| pure virtual |
Sets XOR mode on the backing port
| xorOn | IN The new xor mode |