|
Getting Started
SDK API Reference
SDK API Features
Other Documentation
|
|
|
The set of routines available in the Channel Ports Suite.
More...
#include <PIChannelPortsSuite.h>
Data Fields |
SPAPI SPErr(* | CountLevels )(PIChannelPort port, int32 *count) |
| Determines the number levels the port has.
|
SPAPI SPErr(* | GetDepth )(PIChannelPort port, int32 level, int32 *depth) |
| Gets the pixel depth at a given level.
|
SPAPI SPErr(* | GetDataBounds )(PIChannelPort port, int32 level, VRect *bounds) |
| Gets the bounds for the pixel data at a given level.
|
SPAPI SPErr(* | GetWriteLimit )(PIChannelPort port, int32 level, VRect *writeBounds) |
| Gets the bounds to which we can write at a given level.
|
SPAPI SPErr(* | GetTilingGrid )(PIChannelPort port, int32 level, VPoint *tileOrigin, VPoint *tileSize) |
| Gets the tiling information at a given level.
|
SPAPI SPErr(* | GetSupportRect )(PIChannelPort port, int32 level, const VRect *bounds, int32 *supportLevel, VRect *supportBounds) |
| Finds the rectangle used as the downsample source for a particular level in the pyramid.
|
SPAPI SPErr(* | GetDependentRect )(PIChannelPort port, int32 sourceLevel, const VRect *sourceBounds, int32 dependentLevel, VRect *dependentBounds) |
| Gets the dependent rectangle at a particular level.
|
SPAPI SPErr(* | CanRead )(PIChannelPort port, Boolean *canRead) |
| Determines if the plug-in can read from the port.
|
SPAPI SPErr(* | CanWrite )(PIChannelPort port, Boolean *canWrite) |
| Determines if the plug-in can write to the port.
|
SPAPI SPErr(* | ReadPixelsFromLevel )(PIChannelPort port, int32 level, VRect *bounds, const PixelMemoryDesc *destination) |
| Reads a given rectangle (tile) of pixels from a given level of the port.
|
SPAPI SPErr(* | WritePixelsToBaseLevel )(PIChannelPort port, VRect *bounds, const PixelMemoryDesc *source) |
| Writes a rectangle (tile) of pixels to a level in the pyramid.
|
SPAPI SPErr(* | ReadScaledPixels )(PIChannelPort port, VRect *readRect, const PSScaling *scaling, const PixelMemoryDesc *destination) |
| Reads a given rectangle (tile) of scaled data from the pyramid provided in the port.
|
SPAPI SPErr(* | FindSourceForScaledRead )(PIChannelPort port, const VRect *readRect, const PSScaling *scaling, int32 dstDepth, int32 *sourceLevel, VRect *sourceRect, VRect *sourceScalingBounds) |
| Determines what level would be used for a given scaling.
|
SPAPI SPErr(* | New )(PIChannelPort *port, const VRect *rect, int32 depth, Boolean globalScope) |
| Creates a pixel array and the port to go with it.
|
SPAPI SPErr(* | Dispose )(PIChannelPort *port) |
| Disposes of a port and sets the port to NULL.
|
SPAPI SPErr(* | SupportsOperation )(const char *operation, Boolean *supported) |
| Checks to see whether the host supports an operation.
|
SPAPI SPErr(* | ApplyOperation )(const char *operation, PIChannelPort sourcePort, PIChannelPort destinationPort, PIChannelPort maskPort, void *parameters, VRect *rect) |
| Applies an operation from a source port to a destination port.
|
SPAPI SPErr(* | AddOperation )(const char *operation, SPErr(*proc)(PIChannelPort, PIChannelPort, PIChannelPort, void *, VRect *, void *refCon), void *refCon) |
| Adds a channel port operation.
|
SPAPI SPErr(* | RemoveOperation )(const char *operation, void **refCon) |
| Removes a channel port operation.
|
SPAPI SPErr(* | NewCopyOnWrite )(PIChannelPort *result, PIChannelPort basePort, VRect *writeLimit, Boolean globalScope) |
| Supports using the copy-on-write mechanism.
|
SPAPI SPErr(* | Freeze )(PIChannelPort port) |
| Freezes the data associated with a channel port.
|
SPAPI SPErr(* | Restore )(PIChannelPort port, VRect *area) |
| Restores an area within a copy-on-write port to its initial state.
|
Detailed Description
The set of routines available in the Channel Ports Suite.
Field Documentation
Determines the number levels the port has.
This is the number of levels in the pyramid of an image.
- Parameters:
-
port | Port to check. |
count | [OUT] The number of levels the port has. Zero if port is invalid. |
- Returns:
- Non-zero error if failure.
Gets the pixel depth at a given level.
- Parameters:
-
port | Port to check. |
level | Level of the port to check. |
depth | [OUT] Pixel depth, returned. Zero if the port or level is invalid. |
- Returns:
- Non-zero error if failure.
Gets the bounds for the pixel data at a given level.
- Parameters:
-
port | Port to check. |
level | Level of the port to check. |
bounds | [OUT] Rectangle that provides the bounds for the pixel data. An empty rectangle if the parameters are invalid. |
- Returns:
- Non-zero error if failure.
Gets the bounds to which we can write at a given level.
- Parameters:
-
port | Port to check. |
level | Level of the port to check. |
writeBounds | [OUT] Rectangle that provides the write bounds for the pixel data. |
- Returns:
- Non-zero error if failure.
Gets the tiling information at a given level.
- Parameters:
-
port | Port to check. |
level | Level of the port to check. |
tileOrigin | [OUT] Origin point for the tiling system. |
tileSize | [OUT] Size of the tiles. This is the best size to work with, if possible. |
- Returns:
- Non-zero error if failure.
Finds the rectangle used as the downsample source for a particular level in the pyramid.
- Parameters:
-
port | Port to check. |
level | Level of the port to check. |
bounds | [OUT] |
supportLevel | [OUT] Set to -1 if no support rectangle exists. |
supportBounds | [OUT] Support rectangle, returned. |
- Returns:
- Non-zero error if failure.
Gets the dependent rectangle at a particular level.
- Parameters:
-
port | Port to check. |
sourceLevel | Level of the port to check. |
sourceBounds | [OUT] |
dependentLevel | |
dependentBounds | [OUT] Dependent rectangle, returned. |
- Returns:
- Non-zero error if failure.
Determines if the plug-in can read from the port.
- Parameters:
-
port | Port to check. |
canRead | [OUT] Indicates if the plug-in can read from the port; TRUE if so. |
- Returns:
- Non-zero error if failure.
Determines if the plug-in can write to the port.
- Parameters:
-
port | Port to check. |
canRead | [OUT] Indicates if the plug-in can write to the port; TRUE if so. |
- Returns:
- Non-zero error if failure.
Reads a given rectangle (tile) of pixels from a given level of the port.
- Parameters:
-
port | Port to read from. |
level | Level of the port. |
bounds | [IN/OUT] Provides the rectangular area (tile) of the port to read as an input parameter. Provides the rectangular area (tile) of data actually read into destination.data as an output parameter, if result is noErr . If result is non-zero, the value is undefined. |
destination | [IN/OUT] A description of the memory to read, provided as input. The data read from the port is written into the buffer provided in destination.data . |
- Returns:
- Non-zero error if failure.
Writes a rectangle (tile) of pixels to a level in the pyramid.
- Parameters:
-
port | Port to write to. |
bounds | [IN/OUT] As input, provides the rectangular area (tile) of source.data the pixels are written from. As output, reflects the area of the port actually written to. If the input rectangle maps to pixels beyond the bounds of the port, the output rectangle reflects the area actually written. |
source | A description of the memory to write. The actual pixels that are written to the port are provided in source.data . [??? no existing doc. verify. This appears to be an input only parameter for this function, verify.] |
- Returns:
- Non-zero error if failure.
Reads a given rectangle (tile) of scaled data from the pyramid provided in the port.
To determine what level is used for a given scaling, use FindSourceForScaledRead .
- Parameters:
-
port | Port to read from. |
readRect | [IN/OUT] Provides the rectangular area (tile) of the port to read as an input parameter. Provides the rectangular area (tile) of data actually read as an output parameter. The output rectangle is scaled based on the information provided in scaling . |
scaling | A scaling between source and destination rectangles. |
destination | [IN/OUT] A description of the memory to read, provided as input. The data read from the port is written into destination.data . |
- Returns:
- Non-zero error if failure.
Determines what level would be used for a given scaling.
- Parameters:
-
port | Port to read from. |
readRect | [IN/OUT] Provides the rectangular area of the port to read as an input parameter. Provides the rectangular area of data actually read as an output parameter. The output rectangle is scaled based on the information provided in scaling . |
scaling | A scaling between source and destination rectangles for which to find the pyramid level. |
dstDepth | |
sourceLevel | [OUT] The level that would be read from for this scaling. |
sourceRect | [OUT] The rectangle that would be read from for this scaling. |
sourceScalingBounds | [OUT] The bounds used for scaling from this level to the final result. |
- Returns:
- Non-zero error if failure.
Creates a pixel array and the port to go with it.
- Parameters:
-
port | Returned port. |
rect | The rectangle used to create a pixel array. |
depth | The pixel depth for the pixel array. |
globalScope | |
- Returns:
- Non-zero error if failure.
Disposes of a port and sets the port to NULL.
- Parameters:
-
port | The port to dispose of. |
- Returns:
- Non-zero error if failure.
Checks to see whether the host supports an operation.
- Parameters:
-
operation | The operation to check. See Channel Port Operations. |
supported | [OUT] Indicates whether the operation is supported; TRUE if so. |
- Returns:
- Non-zero error if failure.
Applies an operation from a source port to a destination port.
- Parameters:
-
operation | The operation to apply. See Channel Port Operations. |
sourcePort | The source port to apply an operation from. |
destinationPort | The destination port to write the results of the operation. |
maskPort | |
parameters | A structure that provides the parameters for the operation. The structure depends on the operation. See Channel Port Operations. |
rect | [IN/OUT] A bounding rectangle; may also be an output parameter, depending on the operation. |
- Returns:
- Non-zero error if failure.
Adds a channel port operation.
- Parameters:
-
operation | The name of the operation. |
proc | The routine to execute when this operation is invoked. The first three parameters indicate source, destination and mask ports, respectively. The fifth parameter is a bounding rectangle, and the sixth is a structure used to pass parameters to the operation. |
refCon | |
- Returns:
- Non-zero error if failure.
Removes a channel port operation.
- Parameters:
-
operation | The name of the operation. |
refCon | |
- Returns:
- Non-zero error if failure.
Supports using the copy-on-write mechanism.
- Parameters:
-
result | [OUT] The destination port, returned. |
basePort | The base port; must be frozen. See Freeze. |
writeLimit | [OUT] Defines a rectangle that limits the scope of the write. Can be NULL in which case writing is allowed everywhere. |
globalScope | |
- Returns:
- Non-zero error if failure.
Freezes the data associated with a channel port.
This should generally only be used in conjunction with ports allocated through NewCopyOnWrite .
- Parameters:
-
- Returns:
- Non-zero error if failure.
Restores an area within a copy-on-write port to its initial state.
- Parameters:
-
port | The port to restore. |
area. | The area to restore. If NULL, the entire port is restored. |
- Returns:
- Non-zero error if failure.
The documentation for this struct was generated from the following file:
|
|