AIATEPaintSuite Struct Reference
[API Suite List]
Allows you to convert between ATE and Illustrator types that describe color and other text style attributes.
More...
#include <AIATEPaint.h>
List of all members.
Public Attributes |
AIAPI AIErr(* | GetAIColor )(ATE::ApplicationPaintRef src, AIColor *dst) |
| Converts an ATE ApplicationPaintRef to AIColor .
|
AIAPI AIErr(* | GetAILineCap )(ATE::LineCapType src, AILineCap *dst) |
| Converts an ATE LineCapType to AILineCap .
|
AIAPI AIErr(* | GetAILineJoin )(ATE::LineJoinType src, AILineJoin *dst) |
| Converts an ATE LineJoinType to AILineJoin .
|
AIAPI AIErr(* | GetAIDashStyleArray )(ATE::ArrayRealRef srcArray, AIDashStyle *dstStyle) |
| Converts an ATE ArrayReal to array contained in AIDashStyle .
|
AIAPI AIErr(* | CreateATEApplicationPaint )(const AIColor *src, ATE::ApplicationPaintRef *dst) |
| Converts an AIColor to an ATE ApplicationPaintRef .
|
AIAPI AIErr(* | GetATELineCap )(AILineCap src, ATE::LineCapType *dst) |
| Converts an AILineCap to an ATE LineCapType .
|
AIAPI AIErr(* | GetATELineJoin )(AILineJoin src, ATE::LineJoinType *dst) |
| Converts an AILineJoin to ATE LineJoinType .
|
AIAPI AIErr(* | CreateATELineDashArray )(const AIDashStyle *srcStyle, ATE::ArrayRealRef *dst) |
| Converts an array contained in an AIDashStyle to an ATE ArrayReal .
|
AIAPI AIErr(* | GetAIPathStyleAndMap )(ATE::CharFeaturesRef src, AIPathStyle *pDstPathStyle, AIPathStyleMap *pDstPathStyleMap) |
| Sets fields in a path style and path style map by extracting corresponding data contained in an ATE character feature set.
|
AIAPI AIErr(* | GetCharFeatures )(const AIPathStyle *pSrcPathStyle, const AIPathStyleMap *pSrcPathStyleMap, ATE::CharFeaturesRef dst) |
| Set fields in an ATE character feature set by extracting the corresponding data in a path style and path style map.
|
AIAPI AIErr(* | GetTransparencyAttrs )(ATE::CharFeaturesRef pSrc, AIDictionaryRef pDst) |
| Extracts blend (transparency) information from an ATE character feature set and adds it to an Illustrator dictionary.
|
AIAPI AIErr(* | SetTransparencyAttrs )(AIDictionaryRef pSrc, ATE::CharFeaturesRef pDst) |
| Sets the blend (transparency) attributes in an ATE character feature set based on the blend values in an Illustrator dictionary.
|
Detailed Description
Allows you to convert between ATE and Illustrator types that describe color and other text style attributes.
Keep the following in mind:
- Illustrator suites and ATE suites use slightly different memory management schemes for reference counting. To avoid problems, it is recommended that you use the C++ wrapper classes for the ATE suites instead of using the suites directly. See the example for
CreateATEApplicationPaint()
.
- Because paint attributes are often partially defined, you must use style maps. All
AIPathStyle
instances are treated and returned as partial. If you obtain an AIPathStyle
from this suite, you must check its corresponding AIPathStyleMap
to determine what information in the style is valid. No guarantees are made for invalid entries. Similarly, if you pass in an AIPathStyle
and AIPathStyleMap
, they must be a correct pairing. Pairs that do not correspond produce undefined results.
- You cannot directly instantiate ATE
ApplicationPaint
and ATE ArrayReal
. Instead, pass NULL pointers of type ApplicationPaintRef
and ArrayRealRef
, which are filled with valid references. See example for CreateATEApplicationPaint()
.
- All methods return
kBadParameterErr
if a bad parameter is passed in. These include NULL pointers or source parameters containing data the method was unable to convert; for example, an out-of-range value.
EXAMPLES
The following examples show how to get and set values for a range of text.
ATE::TextRangesRef selRef;
sAIDocument->GetTextSelection(&selRef);
ITextRanges ranges(selRef);
ITextRange range = ranges.getFirst( );
...
bool isValid = false;
AIPathStyle style;
AIPathStyleMap styleMap;
ICharFeatures features = range->getUniqueLocalCharFeatures( );
IApplicationPaint paint = features.getStrokeColor( &isValid );
if ( isValid )
{
error = sAIATEPaintSuite->GetAIPathStyleAndMap(
features.GetRef(), &style, &styleMap
);
...
}
This example starts with an AIPathStyle
and AIPathStyleMap
, and sets corresponding attribute values in an ATE CharFeaturesRef
to create local overrides of text.
ITextRange range = ...
ICharFeatures features;
error = sAIATEPaintSuite->GetCharFeaturesRef(
&style, &styleMap, features
);
if ( kNoErr == error )
{
range.setLocalCharFeatures( features );
}
Member Data Documentation
Converts an AIColor
to an ATE ApplicationPaintRef
.
Example:
ATE::ApplicationPaintRef pPaint = NULL;
sAIATEPaintSuite->CreateATEApplicationPaint(&srcAIColor, &pPaint);
IApplicationPaint paint(pPaint);
...
- Parameters:
-
| src | The Illustrator value. |
| dst | [out] A buffer in which to return the ATE value. |
Converts an ATE ApplicationPaintRef
to AIColor
.
- Parameters:
-
| src | The ATE value. |
| dst | [out] A buffer in which to return the Illustrator value. |
Converts an ATE ArrayReal
to array contained in AIDashStyle
.
- Parameters:
-
| src | The ATE value. |
| dst | [out] A buffer in which to return the Illustrator value. |
Converts an ATE LineCapType
to AILineCap
.
- Parameters:
-
| src | The ATE value. |
| dst | [out] A buffer in which to return the Illustrator value. |
Converts an ATE LineJoinType
to AILineJoin
.
- Parameters:
-
| src | The ATE value. |
| dst | [out] A buffer in which to return the Illustrator value. |
Sets fields in a path style and path style map by extracting corresponding data contained in an ATE character feature set.
- Parameters:
-
| src | The ATE character feature set. |
| pDstPathStyle | [out] A buffer in which to return the Illustrator path style. |
| pDstPathStyleMap | [out] A buffer in which to return the Illustrator path style map. |
Converts an AILineCap
to an ATE LineCapType
.
- Parameters:
-
| src | The Illustrator value. |
| dst | [out] A buffer in which to return the ATE value. |
Converts an AILineJoin
to ATE LineJoinType
.
See example for CreateATEApplicationPaint()
.
- Parameters:
-
| src | The Illustrator value. |
| dst | [out] A buffer in which to return the ATE value. |
Set fields in an ATE character feature set by extracting the corresponding data in a path style and path style map.
- Parameters:
-
| srcPathStyle | A pointer to the Illustrator path style. |
| srcPathStyleMap | A pointer to the Illustrator path style map. |
| dst | [out] A structure in which to return the new ATE character feature set. |
Extracts blend (transparency) information from an ATE character feature set and adds it to an Illustrator dictionary.
- Parameters:
-
| pSrc | The source ATE character feature set. |
| pDst | [out] The dictionary to modify. If the source contains no blend information, the dictionary is not modified. |
- See also:
AIBlendStyleSuite::GetArtAttrs()
for a description of the dictionary entries.
Sets the blend (transparency) attributes in an ATE character feature set based on the blend values in an Illustrator dictionary.
All blend attribute in the dictionary must be known. If any are unknown, all blend information for pDst
is cleared.
- Parameters:
-
| pSrc | The source dictionary. |
| pDst | [out] The ATE character feature set to modify. |
- See also:
AIBlendStyleSuite::GetArtAttrs()
for a description of the dictionary entries.
The documentation for this struct was generated from the following file: