|
AIColor.h File Reference#include "AITypes.h"
#include "AIRealMath.h"
#include "AIHeaderBegin.h"
#include "AIHeaderEnd.h"
Go to the source code of this file.
Classes |
struct | AIGrayColorStyle |
| A grayscale color. More...
|
struct | AIGrayColorStyleMap |
| The valid fields of a partial gray color. More...
|
struct | AIFourColorStyle |
| A CMYK color. More...
|
struct | AIFourColorStyleMap |
| The valid fields of a partial CMYK color. More...
|
struct | AIThreeColorStyle |
| An RGB color. More...
|
struct | AIThreeColorStyleMap |
| The valid fields of a partial RGB color. More...
|
struct | AILabColorStyle |
| A Lab color. More...
|
struct | AILabColorStyleMap |
| The valid fields of a partial Lab color. More...
|
union | AICustomColorUnion |
| The union of all possible process colors that can be associated with a custom color. More...
|
struct | AICustomColor |
| A named custom color. More...
|
struct | AICustomColorStyle |
| An instance of a custom color paint. More...
|
struct | AICustomColorStyleMap |
| The valid fields of a partial custom color paint. More...
|
struct | AIPattern |
| Obsolete. More...
|
struct | AIPatternStyle |
| The pattern style record defines a pattern instance, or an application of a pattern to an art object. More...
|
struct | AIPatternStyleMap |
| The valid fields of a partial pattern style. More...
|
struct | AIGradientStyle |
| The gradient style record defines a gradient instance (also called a blend). More...
|
struct | AIGradientStyleMap |
| The valid fields of a partial gradient style. More...
|
union | AIColorUnion |
| The union of all possible types of color specification. More...
|
union | AIColorUnionMap |
| The valid fields of a partial color union. More...
|
struct | AIColor |
| A color specification, which describes a solid color, pattern, or gradient. More...
|
struct | AIColorMap |
| The valid fields of a partial color specification. More...
|
struct | AIGradientStop |
| Defines a gradient stop. More...
|
struct | AIColorSuite |
| Acquire this suite using SPBasicSuite::AcquireSuite() with the constants kAIColorSuite and kAIColorSuiteVersion . More...
|
Defines |
#define | kCustomSpotColor 0x0001 |
| A AICustomColorFlags bit flag indicating that a custom color is a spot color rather than a global process color.
|
#define | kCustomRegistrationColor 0x0002 |
| A AICustomColorFlags bit flag indicating that a custom color is a registration color.
|
#define | kNameInvalidForSpotColorErr 'NA~.' |
| Attempt to define a spot color with one of the reserved names Cyan, Magenta, Yellow, Black, None or All.
|
#define | kAIColorSuite "AI Color Suite" |
#define | kAIColorSuiteVersion1 AIAPI_VERSION(1) |
#define | kAIColorSuiteVersion kAIColorSuiteVersion1 |
Typedefs |
typedef short | AICustomColorFlags |
| Option flags for properties of a named custom color.
|
typedef void * | AICustomColorHandle |
| Opaque reference to a custom color.
|
typedef void * | AIPatternHandle |
| Opaque reference to a pattern.See AIPatternSuite .
|
typedef void * | AIGradientHandle |
| Opaque reference to a gradient color.
|
typedef unsigned short | AIColorUsedHow |
| Result return type for AIPathStyleSuite::ObjectUsesAIColor() .
|
typedef void(* | AIAdjustColorFunc )(AIColor *color, void *userData, AIErr *result, AIBoolean *altered) |
| Callback function prototype used to iterate through colors, applying a modification and returning the modified color.
|
typedef void(* | AIAdjustColorsWithOPFunc )(AIColor *color, void *userData, AIErr *result, AIBoolean *altered, AIColorUsedHow usedWhere, AIBoolean *overprint) |
| Callback function prototype used to iterate through colors, applying a modification and returning the modified color.
|
typedef AIErr(* | AIAdjustPatternHandleFunc )(AIPatternHandle oldPattern, AIPatternHandle *newPattern, void *userData) |
| Callback function prototype used to adjust or extract colors from pattern handles contained in the dictionary of an effect or plug-in group.
|
typedef unsigned short | VisitAIColorFlags |
| Control options for AIPathStyleSuite::AdjustObjectAIColors() .
|
Enumerations |
enum | AIColorTag {
kGrayColor = 0,
kFourColor,
kPattern,
kCustomColor,
kGradient,
kThreeColor,
kNoneColor,
kAdvanceColor
} |
| Types of colors, patterns, and gradients, that can be used to fill or stroke Illustrator art objects.
More...
|
enum | AICustomColorTag { kCustomFourColor = 0,
kCustomThreeColor,
kCustomLabColor
} |
| Defines a named custom color, whose appearance is defined by a color of one of these types.
More...
|
enum | { kLinearGradient = 0,
kRadialGradient
} |
| Types of gradients, or color blends.
More...
|
enum | AIColorUsedHowValues { kAIColorNotUsed = 0x0000,
kAIColorUsedOnStroke = 0x0001,
kAIColorUsedInFill = 0x0002,
kAIColorUsedIndirectly = 0x0004
} |
| Values for AIColorUsedHow type, returned from AIPathStyleSuite::ObjectUsesAIColor() .
More...
|
enum | VisitAIColorFlagValues {
kVisitColorsNullFlags = 0x0000,
kVisitColorsSelectedOnly = 0x0001,
kVisitColorsUniversally = 0x0002,
kVisitColorsDirectOnly = 0x0004,
kVisitColorsSolidOnly = 0x0008,
kVisitColorsFillsOnly = 0x0010,
kVisitColorsStrokesOnly = 0x0020,
kVisitColorsReadOnly = 0x0040,
kVisitColorsInResultArt = 0x0080,
kVisitGlobalObjectsOnceOnly = 0x0100,
kVisitColorsForModalPreview = 0x0200,
kVisitColorsForceAnonymous = 0x0400,
kVisitColorsIncludeRegistration = 0x0800
} |
| Bit flags for VisitAIColorFlags , options for AIPathStyleSuite::AdjustObjectAIColors .
More...
|
Detailed Description
Define Documentation
#define kAIColorSuite "AI Color Suite" |
#define kAIColorSuiteVersion kAIColorSuiteVersion1 |
#define kAIColorSuiteVersion1 AIAPI_VERSION(1) |
#define kCustomRegistrationColor 0x0002 |
#define kCustomSpotColor 0x0001 |
A AICustomColorFlags bit flag indicating that a custom color is a spot color rather than a global process color.
Typedef Documentation
Callback function prototype used to iterate through colors, applying a modification and returning the modified color.
This is used for situations where one component (such as a Color plug-in filter) knows how to modify colors, and another component knows how to apply them to a specify kind of object or other color collection such as a swatch book. See AIPluginGroup.h and AIPluginSelection.h This supersedes AIMeshColorMap in AIMesh.h , which is deprecated.
- Parameters:
-
| color | [in, out] The color to modify and return. |
| userData | A pointer to data needed for the modification. |
| result | [out] A buffer in which to return an error if the iteration should stop. (This is a parameter rather than a return value, so that the communication can go both ways. If the component handling the objects wants the component making the color adjustments to stop processing other objects and report an error back to the user, it should set result to that error code BEFORE calling the callback function.) |
| altered | [out] A buffer in which to return true if the color was modified (and should therefore be applied to the objects or color collection). |
- See also:
AIPluginGroupSuite::PluginArtAdjustColors() , AIPluginGroupAdjustColorsData
Callback function prototype used to iterate through colors, applying a modification and returning the modified color.
This version can also access and modify the overprint setting for fills and/or strokes.
- Parameters:
-
| color | [in, out] The color to modify and return. |
| userData | A pointer to data needed for the modification. |
| result | [out] A buffer in which to return an error if the iteration should stop. (This is a parameter rather than a return value, so that the communication can go both ways. If the component handling the objects wants the component making the color adjustments to stop processing other objects and report an error back to the user, it should set result to that error code BEFORE calling the callback function.) |
| altered | [out] A buffer in which to return true if the color or overprint was modified, (and should therefore be applied to the objects or color collection). |
| usedWhere | Whether to make overprint changes to fill or stroke. Either kAIColorUsedInFill or kAIColorUsedOnStroke . For any other value, overprint is ignored. |
| overprint | [out] A buffer in which to return true if overprint was modified, (and should therefore be applied to the objects or color collection). |
Callback function prototype used to adjust or extract colors from pattern handles contained in the dictionary of an effect or plug-in group.
The patterns are expected to be brush patterns, symbol patterns or graph designs; other fill patterns can be recolored with the AIAdjustColorFunc() callback, passing a pattern AIColor .
Used in AILiveEffectAdjustColorsMessage and AIPluginGroupAdjustColorsData .
- Parameters:
-
| oldPattern | [in] The pattern to be examined. This object is not altered. |
| newPattern | [out] A buffer in which to return the pattern after color adjustment. If no colors are changed, contains the input pattern. |
| userData | A pointer to developer-defined data needed for the modification, acquired from the message data. |
Enumeration Type Documentation
Types of gradients, or color blends.
See AIGradientStyle .
- Enumerator:
kLinearGradient |
A linear gradient extends in a straight line for a given length at a given angle from an origin point.
|
kRadialGradient |
A radial gradient is circular, and extends for a given radius around a highlight point.
|
Types of colors, patterns, and gradients, that can be used to fill or stroke Illustrator art objects.
- Enumerator:
kGrayColor |
Grayscale color.
|
kFourColor |
Solid ink, expressed in four CMYK process colors.
|
kPattern |
Color with a pattern from the art's pattern list.
|
kCustomColor |
Solid ink, expressed as a custom ink color.
See AICustomColorSuite .
|
kGradient |
Gradient, also called a blend.
See AIGradientSuite .
|
kThreeColor |
Solid color, expressed as three RGB values.
|
kNoneColor |
Null color, If art is painted with kNoneColor , the fillPaint or strokePaint of the AIPathStyle must be false.
|
kAdvanceColor |
Advance color can not be represented in AIColor and need to used with parser.
|
Defines a named custom color, whose appearance is defined by a color of one of these types.
See AICustomColorSuite .
- Enumerator:
kCustomFourColor |
Solid ink, expressed in four process colors.
|
kCustomThreeColor |
Solid color, expressed as three RGB values.
|
kCustomLabColor |
Lab color.
Only valid for spot colors.
|
Bit flags for VisitAIColorFlags , options for AIPathStyleSuite::AdjustObjectAIColors .
Controls which colors are passed to the AIAdjustColorFunc callback.
- Enumerator:
kVisitColorsNullFlags |
Turn all flags off.
|
kVisitColorsSelectedOnly |
When on, iterate only colors used in selected objects (includes text selections and plug-in selections).
When on, implies that kVisitColorsUniversally is off.
|
kVisitColorsUniversally |
When on, iterate all the palette content as well as the artwork, even if unused.
If a color used inside a gradient or pattern is modified, the iterator modifies that gradient or pattern in place, rather than creating a new one with the modified color.
When off, skip color used only in the palette, such as unused symbols, brushes, gradients, and patterns. If a color used inside a gradient or pattern is modified, the iterator creates a new gradient or pattern using the modified color.
Ignored and considered off if kVisitColorsSelectedOnly is on.
|
kVisitColorsDirectOnly |
When on, do not iterate into definition of symbols, patterns, gradients, and brushes.
Ignored and considered off if kVisitColorsUniversally is on.
|
kVisitColorsSolidOnly |
When on, pass only solid colors to the callback function.
Interacts with kVisitColorsDirectOnly:
- If both this and
kVisitColorsDirectOnly are on, pass solid colors that are used directly, but not those used in patterns and gradients.
- If this is on and
kVisitColorsDirectOnly is off, pass solid colors that are used directly, and those used by patterns and gradients.
- If this is off and
kVisitColorsDirectOnly is on, pass only directly-used gradients and patterns. The callback must handle any internal iteration, if needed.
- If both this and
kVisitColorsDirectOnly are off, before iterating a pattern or gradient, pass colors used inside that pattern or gradient. This ensures that any patterns or gradients modified or created by the iterator are also passed. See kVisitColorsUniversally .
|
kVisitColorsFillsOnly |
When on, iterates colors used in fills, but not those used in strokes.
|
kVisitColorsStrokesOnly |
When on, iterates colors used in strokes, but not those used in fills.
|
kVisitColorsReadOnly |
When on, the callback examines the iterated colors but does not modify them.
Setting this allows the iterator to skip setup for Undo processing and so on, making it faster and less memory intensive.
|
kVisitColorsInResultArt |
When on, iterates the result art of plug-in groups.
(The result art is regenerated, so this is only useful for examination, not for modification.)
|
kVisitGlobalObjectsOnceOnly |
When on, if the selection includes multiple uses of the same global object, passes that object to the callback only once, and uses the resulting replacement object for all subsequent occurrences.
When off, passes each occurrence to the callback. Useful for statistical applications, or, for example, random color replacements, so that objects initially painted with the same color become different colors.
|
kVisitColorsForModalPreview |
When on, the operation is occurring during a modal dialog's preview of interim settings.
This allows the iterator and/or the callback function to skip processing that is only needed for ordinary final state edits, such as action recording, graph change recording, inserting new global objects into palettes, and so on.
|
kVisitColorsForceAnonymous |
When on, new global objects are always made anonymous and not inserted into panels, even if the original color is named and has a swatch.
Also affects the behavior of symbol colorization. By default (even when kVisitColorsForModalPreview is on), recoloring symbol instances recolors the symbol definition, thus affecting all instances of the symbol, even those that are NOT in the visited art. When kVisitColorsForceAnonymous is on, a new anonymous symbol is created instead. Ignored and considered off if kVisitColorsUniversally is on (since that flag causes colorization of all existing panel content instead of the input art.)
|
kVisitColorsIncludeRegistration |
When on, the Registration color is not filtered out.
(By default this color is not visited.)
|
|