Adobe.com
Contents Suites Classes Class Index Member Index

AIArtStyleSuite Struct Reference
[API Suite List]

The functions in the Art Style suite are used to access and modify art styles on artwork in Illustrator documents. More...

#include <AIArtStyle.h>

List of all members.

Public Attributes

AIAPI AIErr(* GetStyledArt )(AIArtHandle art, AIArtHandle *styledArt)
 Retrieves the styled art for an art object.
AIAPI AIErr(* GetArtStyle )(AIArtHandle art, AIArtStyleHandle *artStyle)
 Retrieves the art style associated with an art object.
AIAPI AIErr(* GetCurrentArtStyle )(AIArtStyleHandle *artStyle, AIBoolean *mixedState)
 Retrieves the art style currently displayed in the Appearance palette.
AIAPI AIErr(* GetArtStyleByName )(AIArtStyleHandle *artStyle, const ai::UnicodeString &name, AIBoolean searchAllStyles)
 Retrieves an art style by its unique name from the current document.
AIAPI AIErr(* CountNamedArtStyles )(ai::int32 *count)
 Gets the number of art styles currently listed in the Graphic Styles palette.
AIAPI AIErr(* GetNthNamedArtStyle )(ai::int32 n, AIArtStyleHandle *artStyle)
 Retrieves a named art style by index.
AIAPI AIErr(* SetArtStyle )(AIArtHandle art, AIArtStyleHandle artStyle)
 Applies an art style to an art object.
AIAPI AIErr(* SetCurrentArtStyle )(AIArtStyleHandle artStyle)
 Applies an art style to the currently targeted objects on the artboard.
AIAPI AIBoolean(* IsArtStyleAnonymous )(AIArtStyleHandle artStyle)
 Reports whether an art style is anonymous.
AIAPI AIErr(* GetArtStyleName )(AIArtStyleHandle artStyle, ai::UnicodeString &name, AIBoolean *isAnonymous)
 Retrieves the unique name of an art style.
AIAPI AIErr(* SetArtStyleName )(AIArtStyleHandle artStyle, const ai::UnicodeString &name)
 Sets the unique name of a named art style; that is, one that is shown in the Graphic Styles palette.
AIAPI AIErr(* GetPaintAttributes )(AIArtStyleHandle artStyle, AIPathStyle *aiPathStyle, AIArtStylePaintData *paintData)
 Retrieves the paint information for an art style.
AIAPI AIErr(* NewStyle )(AIPathStyle *aiPathStyle, AIArtStylePaintData *paintData, AIDictionaryRef blendDict, AIArtStyleHandle *newStyle)
 Creates a new art style.
AIAPI AIErr(* AddNamedStyle )(AIArtStyleHandle artStyle, const ai::UnicodeString &name, AIBoolean uniquify, AIArtStyleHandle *namedStyle)
 Converts an anonymous style to a named style, which is shown in the Graphic Styles palette.
AIAPI AIErr(* RemoveNamedStyle )(AIArtStyleHandle namedStyle, AIArtStyleHandle *anonStyle)
 Converts a named style, which is shown in the Graphic Styles palette, to an anonymous style, which is not.
AIAPI AIErr(* CreateAnonymousStyle )(AIArtStyleHandle namedStyle, AIArtStyleHandle *anonStyle)
 Creates an anonymous copy of a named art style (one shown in the Graphics Styles palette).
AIAPI AIErr(* RedefineNamedStyle )(AIArtStyleHandle namedStyle, AIArtStyleHandle dstStyle)
 Redefines a named art style to have the same characteristics as another style.
AIAPI AIErr(* MoveNamedStyle )(AIArtStyleHandle namedStyle, ai::int32 index)
 Moves a named art style to a position in the Graphic Styles palette.
AIAPI AIErr(* GetArtStyleByNameFromDocument )(AIArtStyleHandle *artStyle, const ai::UnicodeString &name, AIDocumentHandle document)
 Retrieves a named art style by its unique name from a specified document.
AIAPI AIErr(* CountNamedArtStylesFromDocument )(ai::int32 *count, AIDocumentHandle document)
 Gets the number of named art styles in a specified document (those shown in the Graphic Styles palette when that document is current).
AIAPI AIErr(* GetNthNamedArtStyleFromDocument )(ai::int32 n, AIArtStyleHandle *artStyle, AIDocumentHandle document)
 Retrieves a named art style by index for a specified document.
AIAPI AIErr(* Equiv )(AIArtStyleHandle artStyle1, AIArtStyleHandle artStyle2, AIBoolean *result)
 Tests equivalence between two art styles.
AIAPI AIErr(* SortNamedStyles )(void)
 Sorts the named art styles in the current document alphabetically.
AIAPI AIErr(* GetDefaultArtStyle )(AIArtStyleHandle *artStyle)
 Retrieves the default art style of the current document, which is always listed first in the Graphic Styles palette.
AIAPI AIErr(* GetDefaultArtStyleName )(ai::UnicodeString &name)
 Retrieves the name of the default art style of the current document, which is always listed first in the Graphic Styles palette.
AIAPI AIBoolean(* ValidateArtStyle )(AIArtStyleHandle artStyle)
 Reports whether an art style exists in the current document.
AIAPI AIErr(* FlattenStyle )(AIArtHandle art)
 Expands the style of an art object, replacing the art object with the art that would be returned by GetStyledArt().
AIAPI AIErr(* GetArtStyleType )(AIArtStyleHandle artStyle, ai::int16 *type)
 Retrieves the type of an art style.
AIAPI AIBoolean(* CanExecute )(AIArtStyleHandle artStyle)
 Reports whether an art style contains all the pieces it needs in order to execute.
AIAPI AIReal(* GetArtStyleScaleFactor )(AIArtHandle art)
 Returns the scale factor for an art object's style.
AIAPI AIErr(* SetArtStyleScaleFactor )(AIArtHandle art, AIReal scaleFactor)
 Sets the scale factor for an art object's style.
AIAPI AIErr(* ResetArtStyleScaleFactor )(AIArtHandle art)
 Applies a new style to an art object that is scaled by the object's current scale factor, and resets the scale factor for the object to 1.
AIAPI AIErr(* TransformObjectArtStyle )(AIArtHandle art, AIRealMatrix *matrix, AIReal lineScale, ai::int32 flags)
 Transforms the art style of an object.
AIAPI AIArtStyleHasAttrs(* ExamineStyle )(AIArtStyleHandle artStyle, AIArtStyleHasAttrs checkFor)
 Examines an art style for specific attributes, and returns the ones found.
AIAPI AIErr(* GetToolArtStyle )(AIArtStyleHandle *artStyle)
 Retrieves the art style that will be used for new art created by a tool, based on application preferences.
AIAPI AIErr(* GetFlattenedArt )(AIArtHandle art, AIArtHandle *flattenedArt)
 Expands the style of an art object, replacing the art object with the art that would be returned by GetStyledArt().
AIAPI AIBoolean(* HasEffectiveNullStyle )(AIArtHandle art)
 Reports whether an art object has a style that would be equivalent to a null style.
AIAPI AIErr(* GetPaintMap )(AIArtStyleHandle artStyle, AIPathStyleMap *aiPathStyleMap)
 Retrieves the map for the path style of an art style, as retrieved by GetPaintAttributes().

Detailed Description

The functions in the Art Style suite are used to access and modify art styles on artwork in Illustrator documents.

In AI8, Illustrator introduced the concept of plug-in groups, where the art that was actually printed (result art) was separate from the art that the user edited (edit art). This concept was extended in AI9 with the introduction of art styles. Now, any art object in the document (including groups and text objects) can optionally have "styled art" attached to it. It is this "styled art" that gets printed, not the original "source art".

The art style applied to an art object controls how styled art is generated. A plug-in should not directly modify styled art itself, which can be regenerated at any time, but should instead work with the art styles.

Export plug-ins should export the styled art, if any, applied to an object, rather than the original source art.

In the UI, the art style applied to an Illustrator art object is known as the object's appearance, and is manipulated through the Appearance palette. Appearances can also be saved and reused on other objects through the Graphic Styles palette.


Member Data Documentation

AIAPI AIErr(* AIArtStyleSuite::AddNamedStyle)(AIArtStyleHandle artStyle, const ai::UnicodeString &name, AIBoolean uniquify, AIArtStyleHandle *namedStyle)

Converts an anonymous style to a named style, which is shown in the Graphic Styles palette.

Parameters:
artStyle The anonymous art style.
name The new name. Style names are limited to 64 characters (including the terminating NULL character). Empty ("") names are not allowed.
uniquify When true, the function appends a numeric string to make the name unique, if it is already in use. When false, if the name is in use, the function fails.
namedStyle [out] A buffer in which to return the new art style reference.
Returns:
kNameInUseErr if the name is already in use and uniquify is false.

Reports whether an art style contains all the pieces it needs in order to execute.

(Note that this function returns a boolean value, not an error code.)

Parameters:
artStyle The art style.
Returns:
True if the style can be successfully applied.
False if the style contains an effect provided by a plug-in that cannot be found in the Plug-Ins folder.

Gets the number of art styles currently listed in the Graphic Styles palette.

Use with GetNthNamedArtStyle() to iterate through art styles in the current document.

Parameters:
count [out] A buffer in which to return the number of styles.
See also:
CountNamedArtStylesFromDocument()

Gets the number of named art styles in a specified document (those shown in the Graphic Styles palette when that document is current).

Use with GetNthNamedArtStyleFromDocument() to iterate through art styles in a particular document.

Parameters:
count [out] A buffer in which to return the number of styles
document The document.
See also:
CountNamedArtStyles()

Creates an anonymous copy of a named art style (one shown in the Graphics Styles palette).

The named style remains in the palette.

Parameters:
namedStyle The named style. (If this is an anonymous style, it is copied to anonStyle.)
anonStyle [out] A buffer in which to return the new art style reference.
AIAPI AIErr(* AIArtStyleSuite::Equiv)(AIArtStyleHandle artStyle1, AIArtStyleHandle artStyle2, AIBoolean *result)

Tests equivalence between two art styles.

Parameters:
artStyle1 The first art style.
artStyle2 The second art style.
result [out] A buffer in which to return the output as true if the styles are equivalent.
Note:
A false result does not guarantee that the two styles are not equivalent.

Examines an art style for specific attributes, and returns the ones found.

(Note that the function returns an attribute structure, not an error code.)

Parameters:
artStyle The art style.
checkFor A logical OR of AIArtStyleHasAttrsBits values, specifying which attributes to check for. Pass kStyleCheckForAll to check all attributes.
Returns:
A logical OR of AIArtStyleHasAttrsBits values for those attributes found in the style.

Expands the style of an art object, replacing the art object with the art that would be returned by GetStyledArt().

Transfers opacity masks, URLs, tags, and so on from the input art to the flattened art.

Parameters:
art The art object. Upon return, this reference is no longer valid.
Note:
This function is maintained for compatibility with older plug-ins, but is superseded by GetFlattenedArt()

Retrieves the art style associated with an art object.

Parameters:
art The art object.
artStyle [out] A buffer in which to return the art style reference, or NULL if no art style is applied. Null art styles are common for objects of type kGroupArt, kPlacedArt, and kPluginArt.
AIAPI AIErr(* AIArtStyleSuite::GetArtStyleByName)(AIArtStyleHandle *artStyle, const ai::UnicodeString &name, AIBoolean searchAllStyles)

Retrieves an art style by its unique name from the current document.

Parameters:
artStyle [out] A buffer in which to return the art style reference.
name The unique name.
searchAllStyles When true, search all styles in the current document, including anonymous styles. When false, search only named styles (those shown in the Graphic Styles palette).
See also:
GetArtStyleByNameFromDocument()

Retrieves a named art style by its unique name from a specified document.

Searches only named styles (those that are shown in the Graphic Styles palette when the specified document is current).

Parameters:
artStyle [out] A buffer in which to return the art style reference.
name The unique name.
document The document.
See also:
GetArtStyleByName()

Retrieves the unique name of an art style.

Parameters:
artStyle The art style.
name [out] A buffer in which to return the name.
isAnonymous [out] A buffer in which to return the output as true if the style is anonymous, or false if it is named (shown in the Graphic Styles palette).

Returns the scale factor for an art object's style.

(Note that the function returns a numeric value, not an error code.)
The option "Scale Strokes & Effects" allows you to scale the stroke weight and effects attached to an art object.The scale factor is stored with the art object, and applied after the style is applied. For example, if the style attached to an object has a stroke with a weight of 2 pt, and the object's scale factor is 2.5, the visual stroke weight is 5 pt.

Note:
GetPaintAttributes() gets the unscaled parameter values,as do functions from the AIArtStyleParserSuite.
However, the AIPathStyleSuite calls return the scaled stroke weights attached to the objects.
Parameters:
art The art object.
Returns:
The scale factor.
See also:
SetArtStyleScaleFactor()
ResetArtStyleScaleFactor()

Retrieves the type of an art style.

Parameters:
artStyle The art style.
type [out] A buffer in which to return the type; a AIArtStyleType value.

Retrieves the art style currently displayed in the Appearance palette.

Parameters:
artStyle [out] A buffer in which to return the art style reference.
mixedState [out] A buffer in which to return true if the Appearance palette shows "Mixed". In this case, the returned art style is a simple style which is an attempt to gather the common attributes of the art styles attached to the currently selected objects in the current document.

Retrieves the default art style of the current document, which is always listed first in the Graphic Styles palette.

Parameters:
artStyle [out] A buffer in which to return the art style reference.

Retrieves the name of the default art style of the current document, which is always listed first in the Graphic Styles palette.

Parameters:
name [out] A buffer in which to return the name.

Expands the style of an art object, replacing the art object with the art that would be returned by GetStyledArt().

Transfers opacity masks, URLs, tags, and so on from the input art to the flattened art.

Parameters:
art The art object. Upon return, this reference is no longer valid, unless no flattening was needed.
flattenedArt [out] A buffer in which to return the flattened art object.

Retrieves a named art style by index.

Use with CountNamedArtStyles() to iterate through art styles that are currently shown in the Graphic Styles palette.

Parameters:
n The position index, in the range [0..numStyles-1].
artStyle [out] A buffer in which to return the art style reference.
See also:
GetNthNamedArtStyleFromDocument()

Retrieves a named art style by index for a specified document.

Use with CountNamedArtStylesFromDocument() to iterate through art styles that are shown in the Graphic Styles palette when that document is current.

Parameters:
n The position index, in the range [0..numStyles-1].
artStyle [out] A buffer in which to return the art style reference.
document The document.
See also:
GetNthNamedArtStyle()

Retrieves the paint information for an art style.

Parameters:
artStyle The art style.
aiPathStyle [out] A buffer in which to return an AIPathStyle structure that contains information about the fill, stroke and the even-odd fill rule.
paintData [out] A buffer in which to return an AIArtStylePaintData structure that contains the gradient vector and origin relative to the object's bounding box.

Retrieves the map for the path style of an art style, as retrieved by GetPaintAttributes().

The map indicates which fields of an AIPathStyle are specified by a partial style. A path style can contain unknown or mixed attributes (indicated by a value of false for that attribute in the map) only when it is associated with a graph object, not when it is associated with an art object.

Parameters:
artStyle The art style.
aiPathStyleMap [out] A buffer in which to return the path style map.

Retrieves the styled art for an art object.

The objects that comprise the styled art cannot themselves have styled art.

Parameters:
art The art object.
styleArt [out] A buffer in which to return the styled art object, or the original art object if there is no special style applied. Returns NULL in case of error; for example, if a Live Effect failed to execute because of memory constraints.

Retrieves the art style that will be used for new art created by a tool, based on application preferences.

Parameters:
artStyle [out] A buffer in which to return the style reference.

Reports whether an art object has a style that would be equivalent to a null style.

This is the same as verifying that the style has no fill, no stroke, no effects, and default transparency attributes. (Note that the function returns a boolean value, not an error code.)

Parameters:
art The art object.
Returns:
True if the art's style is effectively null.

Reports whether an art style is anonymous.

Named art styles appear in the Graphic Styles palette. (Note that the function returns a boolean value, not an error code.)

Parameters:
artStyle The art style object.
Returns:
True if the style is anonymous; false if it is named.

Moves a named art style to a position in the Graphic Styles palette.

Parameters:
namedStyle The named art style.
index The new position index. Use -1 to move the art style to the end of the list.
AIAPI AIErr(* AIArtStyleSuite::NewStyle)(AIPathStyle *aiPathStyle, AIArtStylePaintData *paintData, AIDictionaryRef blendDict, AIArtStyleHandle *newStyle)

Creates a new art style.

Parameters:
aiPathStyle An AIPathStyle structure that contains information about the fill, stroke and the even-odd fill rule.
paintData An AIArtStylePaintData structure that contains the gradient vector and origin relative to the object's bounding box. Can be NULL.
blendDict A dictionary that contains the transparency information. Can be NULL.
newStyle [out] A buffer in which to return the new art style reference.

Redefines a named art style to have the same characteristics as another style.

Parameters:
namedStyle The named style to redefine.
dstStyle The style to copy attributes from.
Returns:
The error kStyleNotInCurrentDocument if namedStyle is not in the current document.

Converts a named style, which is shown in the Graphic Styles palette, to an anonymous style, which is not.

Removes the named style from the palette.

Parameters:
namedStyle The named art style.
anonStyle [out] A buffer in which to return the new art style reference.
Returns:
kStyleNotInCurrentDocument if the art style is not in the current document.

Applies a new style to an art object that is scaled by the object's current scale factor, and resets the scale factor for the object to 1.

Parameters:
art The art object.
See also:
GetArtStyleScaleFactor()
ResetArtStyleScaleFactor()

Applies an art style to an art object.

Parameters:
art The art object.
artStyle The art style, or NULL to remove any art style currently associated with the art object.
Returns:
kStyleNotInCurrentDocument if the given art style is not in the current document.

Sets the unique name of a named art style; that is, one that is shown in the Graphic Styles palette.

Anonymous styles cannot be renamed. You can use AddNamedStyle() to convert an anonymous style to a named style.

Parameters:
artStyle The art style. This must be a named art style
name The new name. Style names are limited to 64 characters (including the terminating NULL character). Empty ("") names are not allowed.
Returns:
kStyleNotInCurrentDocument if the given art style is not in the current document.
kNameInUseErr if another art style already exists with the given name.

Sets the scale factor for an art object's style.

The scale factor is stored with the art object, and applied after the style is applied.

Parameters:
art The art object.
scaleFactor The new scale factor.
See also:
GetArtStyleScaleFactor()
ResetArtStyleScaleFactor()

Applies an art style to the currently targeted objects on the artboard.

This is the same clicking the style in the Graphic Styles palette.

Parameters:
artStyle The art style.
Returns:
kStyleNotInCurrentDocument if the given art style is not in the current document.

Sorts the named art styles in the current document alphabetically.

The order is reflected in the Graphic Styles palette.

Transforms the art style of an object.

Parameters:
art The art object.
matrix A pointer to the transformation matrix.
lineScale The scale factor to apply to the line-drawing style values specified in the art object�s current style.
flags Bit flags that control how the transformation is performed. A logical OR of AITransformArtOptions values. If the kTransformObjects flag is on, it is assumed that the art object itself has also been transformed by the same matrix, and that any transformation of the points, descendant art, and so on, have already been performed. This allows gradient vectors and other style attributes that are dependent upon object bounds to be adjusted immediately, rather than deferred until artwork synchronization.

Reports whether an art style exists in the current document.

(Note that the function returns a boolean value, not an error code.)

Parameters:
artStyle The art style.
Returns:
True if the art style is in the current document.

The documentation for this struct was generated from the following file:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks