#include <IPreflightArtworkImage.h>
This interface provides access to image data provided from mark or group interfaces. In particular, IPreflightArtworkMarkInfo::Rasterize(). This interface sits on a boss pretty much all by itself. Typically it's used to look at a raster version of some object when inspecting the attributes are not sufficient.
- See Also
- IPreflightArtworkMarkInfo
| Enumerator |
|---|
| kRF_Default | The default rasterization set: no alpha |
| kRF_Alpha | Include an alpha channel in the rasterized image. |
| virtual Int32Rect IPreflightArtworkImage::GetBounds | ( | | ) | const |
| pure virtual |
Get the pixel bounds of the image.
- Returns
- The pixel bounds of the image.
| virtual const int32 IPreflightArtworkImage::GetChunkyPixelSize | ( | | ) | const |
| pure virtual |
Obtains the byte size of each pixel; ie the increment by which you should increase the pointer to get to the next pixel.
- Returns
- The number of bytes between pixel origins.
| virtual int32 IPreflightArtworkImage::GetPixelIncrement | ( | int32 | channel | ) | const |
| pure virtual |
Get the number of bytes between pixels (in a given row). This along with GetPixelPtr() allows you to walk the pixel data quickly, but you need to be careful to use it properly. In particular you need to use GetPixelIncrement() to know how far to move in a given row and GetRowIncrement() to know how to move to the same pixel in the next/prev row.
- Parameters
| n | The channel for which you want the increment. In some cases (eg separate alpha) the channel data may be in a completely separate piece of memory with a different row/pixel increment from other channels. |
- Returns
- The number of bytes to add to a pixel pointer to get to the next (x+1) pixel in the same row.
| virtual const uint8* IPreflightArtworkImage::GetPixelPtr | ( | int32 | channel, | | | int32 | x, | | | int32 | y | | ) | | const |
| pure virtual |
Get a pointer to the image data for a particular pixel.
- Parameters
| channel | IN Which channel you want a pointer to. |
| x | IN The x coordinate in GetBounds() space (note that xMin, xMax can be negative) |
| y | IN The y coordinate in GetBounds() space (note that yMin, yMax can be negative) |
- Returns
- A pointer to the pixel/channel, or nil if any of the parameters are out of bounds.
| virtual int32 IPreflightArtworkImage::GetRowIncrement | ( | int32 | channel | ) | const |
| pure virtual |
Get the number of bytes between rows. This along with GetPixelPtr() and GetPixelIncrement() allows you to walk the pixel data quickly, but you need to be careful to use it properly. In particular you need to use GetPixelIncrement() to know how far to move in a given row and GetRowIncrement() to know how to move to the same pixel in the next/prev row.
- Parameters
| n | The channel for which you want the increment. In some cases (eg separate alpha) the channel data may be in a completely separate piece of memory with a different row/pixel increment from other channels. |
- Returns
- The number of bytes to add to a pixel pointer to get to the same pixel in the next (y+1) row.
| virtual const uint8* IPreflightArtworkImage::QueryChunkyScanline | ( | int32 | y | ) | const |
| pure virtual |
Alternative pixel interface that provides chunky pixels. If you want to look at all of the channels of the data together, chunky is generally easiest, but the generic accessors above support chunky, planar, or a combination, so it's hard to make a compact and efficient algorithm (the general case involves incrementing N pointers for each pixel). The chunky accessors will rearrange pixel data on a scanline basis if necessary in order to provide chunky data. If the data is already chunky then this is a very fast operation; if it's not, it's going to be as least as fast as any chunkifier you would write.
This method obtains a pointer to chunky data for the specified scanline. (And only that scanline; you can't generally go beyond or before this in order to get next/prev rows.)
- Parameters
| y | IN The Y coordinate of the scanline in which you're interested. Must be within the bounds ( |
- See Also
- GetBounds).
- Returns
- A pointer to the chunky scanline data. You need to release this when you're done via
- See Also
- ReleaseChunkyScanline.
Get the colorspace information. You'll need this to get most of the stats about the space, including whether it has alpha, how many channels, which channel is which, etc.
- Returns
- A refcounted colorspace info interface.
| virtual void IPreflightArtworkImage::ReleaseChunkyScanline | ( | const uint8 * | p | ) | const |
| pure virtual |
Releases the scanline reserved by QueryChunkyScanline.
- Parameters
| p | IN The scanline you're releasing. After this you should not attempt to access it. |
| virtual void IPreflightArtworkImage::SetBounds | ( | const Int32Rect & | b | ) | |
| pure virtual |
Sets the bounds. Internal use only.
- Parameters
Sets the colorspace. Internal use only.
- Parameters
| virtual void IPreflightArtworkImage::SetPixelIncrement | ( | int32 | inc | ) | |
| pure virtual |
Sets the pixel increment. Internal use only.
- Parameters
| virtual void IPreflightArtworkImage::SetRowIncrement | ( | int32 | inc | ) | |
| pure virtual |
Sets the row increment. Internal use only.
- Parameters
| virtual void IPreflightArtworkImage::SetSharedBuffer | ( | void * | buf | ) | |
| pure virtual |
Sets the shared buffer. Internal use only.
- Parameters
| buf | IN The buffer; this is an opaque type, not a memory buffer. |