This data structure is used in the ColorServicesProc callback function.
More...
#include <PIGeneral.h>
Data Fields |
int32 | infoSize |
| Size of the ColorServicesInfo record in bytes.
|
int16 | selector |
| Operation performed by the ColorServices callback.
|
int16 | sourceSpace |
| Indicates the color space of the input color contained in colorComponents.
|
int16 | resultSpace |
| Desired color space of the result color.
|
Boolean | resultGamutInfoValid |
| This output only field indicates whether the resultInGamut field has been set.
|
Boolean | resultInGamut |
| Indicates whether the returned color is in gamut for the currently selected printing setup.
|
void * | reservedSourceSpaceInfo |
| Both voids must be NULL or will return paramErr:
|
void * | reservedResultSpaceInfo |
| Must be NULL, otherwise returns parameter error.
|
int16 | colorComponents [4] |
| Actual color components of the input or output color.
|
void * | reserved |
| Reserved must be NULL or will return paramErr:
|
union { |
Str255 * pickerPrompt |
| Contains a pointer to a Pascal string which is used as a prompt in the color picker for the plugIncolorServicesChooseColor call.
|
Point * globalSamplePoint |
| Points to a Point record that is the current sample point.
|
int32 specialColorID |
| should be either: 0=plugIncolorServicesForegroundColor or 1=plugIncolorServicesBackgroundColor .
|
} | selectorParameter |
| This union is used for providing different information based on the selector field.
|
Detailed Description
This data structure is used in the ColorServicesProc callback function.
Field Documentation
Size of the ColorServicesInfo record in bytes.
The value is used as a version identifier in case this record is expanded in the future. It can be filled in as follows:
Indicates the color space of the input color contained in colorComponents.
For plugIncolorServicesChooseColor
the input color is used as an initial value for the picker. For plugIncolorServicesConvertColor the input color is converted from the color space indicated by sourceSpace
to the one indicated by resultSpace. See Color Space for values.
Desired color space of the result color.
The result is contained in the colorComponents field. For the plugIncolorServicesChooseColor
selector, resultSpace
can be set to -1=plugIncolorServicesChosenSpace
to return the color in whichever color space the user chose. In that case, resultSpace
contains the chosen color space on output. See Color Space for values.
This output only field indicates whether the resultInGamut field has been set.
In Photoshop 3.0 and later, this is only true for colors returned in the plugIncolorServicesCMYKSpace
color space.
Indicates whether the returned color is in gamut for the currently selected printing setup.
Only meaningful if resultGamutInfoValid=TRUE.
Both voids must be NULL or will return paramErr:
Must be NULL, otherwise returns parameter error.
Must be NULL, otherwise returns parameter error.
Actual color components of the input or output color.
The values of the array depend on the color space.
colorComponents array structure
Color Space | [0] | [1] | [2] | [3] |
RGB | red from 0...255 | green from 0...255 | blue from 0...255 | undefined |
HSB | hue from 0...359 degrees | saturation from 0...359 degrees (representing 0%...100%) | brightness from 0...359 degrees(representing 0%...100%) | undefined |
CMYK | cyan from 0...255 (representing 100%...0%) | magenta from 0...255(representing 100%...0%) | yellow from 0...255(representing 100%...0%) | black from 0...255(representing 100%...0%) |
HSL | hue from 0...359 degrees | saturation from 0...359 degrees(representing 0%...100%) | luminance from 0...359 degrees(representing 0%...100%) | undefined |
Lab | Luminance from 0...255(representing 0...100) | a. chromanance from 0...255 degrees(representing -128...127) | b. chromanance from 0...255 degrees(representing -128...127) | undefined |
Gray Scale | gray value from 0...255 | undefined | undefined | undefined |
XYZ | x value from 0...255 | Y value from 0...255 | Z value from 0...255 | undefined |
Reserved must be NULL or will return paramErr:
Must be NULL, otherwise returns parameter error.
Contains a pointer to a Pascal string which is used as a prompt in the color picker for the plugIncolorServicesChooseColor
call.
NULL can be passed to indicate no prompt.
Points to a Point
record that is the current sample point.
should be either: 0=plugIncolorServicesForegroundColor
or 1=plugIncolorServicesBackgroundColor
.
This union is used for providing different information based on the selector field.
The documentation for this struct was generated from the following file: