Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Friends | List of all members
hdi::core::ArtStyle Class Reference

Describes an art style. More...

#include <hdicoreArtStyle.h>

Classes

class  BlendField
 Describes blending info for an art style or paint field of an art style. More...
 
class  Effect
 Effects are contained by art styles and are used to replace typical fill/stroke drawing. More...
 
struct  PaintData
 Stores art style gradient information. More...
 
class  PaintField
 Corresponds to either a fill or a stroke in an art style. Each paint field can also contain live effects and transparency information. More...
 

Public Types

enum  Type { UnknownType = 0 , SimpleType = 10 , ActiveType = 20 }
 Indicates the type of an art style.
 
enum  Attributes {
  NoAttributes = 0 , HasFillAttribute = 1 << 0 , HasStrokeAttribute = 1 << 1 , PatternsAttribute = 1 << 2 ,
  CustomColorsAttribute = 1 << 3 , FillGradientsAttribute = 1 << 4 , FillRadialGradientsAttribute = 1 << 5 , StrokeGradientsAttribute = 1 << 6 ,
  StrokeRadialGradientsAttribute = 1 << 7 , TransparencyAttribute = 1 << 8 , BrushesAttribute = 1 << 9 , EffectsAttribute = 1 << 10 ,
  ScalableEffectsAttribute = 1 << 11
}
 Indicates the various attributes of an art style.
 
typedef std::unique_ptr< PaintDataPaintDataUP
 
typedef std::shared_ptr< PaintDataPaintDataSP
 
typedef std::weak_ptr< PaintDataPaintDataWP
 
typedef std::unique_ptr< BlendFieldBlendFieldUP
 
typedef std::shared_ptr< BlendFieldBlendFieldSP
 
typedef std::weak_ptr< BlendFieldBlendFieldWP
 
typedef std::unique_ptr< EffectEffectUP
 
typedef std::shared_ptr< EffectEffectSP
 
typedef std::weak_ptr< EffectEffectWP
 
typedef std::unique_ptr< PaintFieldPaintFieldUP
 
typedef std::shared_ptr< PaintFieldPaintFieldSP
 
typedef std::weak_ptr< PaintFieldPaintFieldWP
 

Public Member Functions

 ArtStyle ()
 Constructs an empty ArtStyle object.
 
 ArtStyle (const ArtStyle &a_)
 ArtStyle copy constructor.
 
 ArtStyle (const AIArtStyleHandle aiArtStyle_)
 Constructs a new ArtStyle object from an AIArtStyleHandle.
 
virtual ~ArtStyle ()
 Destructs an ArtStyle object.
 
virtual ArtStyleoperator= (const ArtStyle &rhs_)
 Overloaded ArtStyle assignment operator.
 
virtual bool operator== (const ArtStyle &rhs_) const
 Tests whether a given ArtStyle object is the same as another.
 
virtual bool operator!= (const ArtStyle &rhs_) const
 Tests whether a given ArtStyle object is not the same as another.
 
virtual AIArtStyleHandle aiArtStyleHandle () const
 Gets the art style handle around which the target object is wrapped.
 
virtual bool valid ()
 Tests the validity of the target style by searching for it in the document.
 
virtual std::string name () const
 Gets the name of the art style.
 
virtual void setName (const std::string &name_)
 Sets the name of the art style.
 
virtual bool isAnonymous () const
 Gets whether an art style is anonymous (named art styles appear in the styles panel)
 
virtual Type styleType () const
 Gets the type of the art style.
 
virtual Attributes attributes () const
 Gets the attributes of the art style.
 
virtual bool visible () const
 Gets whether the style is visible.
 
virtual bool hasFillOrStroke () const
 Gets whether the style has any fill or stroke.
 
virtual bool hasEffects () const
 Gets whether the style has any live effects.
 
virtual bool hasTransparency () const
 Gets whether the style has any transparency.
 
virtual int32_t paintFieldCount () const
 Gets the number of paint fields in the target style.
 
virtual std::unique_ptr< PaintFieldpaintFieldAtIndex (const int32_t index_) const
 Gets a paint field from the target style by position index.
 
virtual std::unique_ptr< PaintFieldfocusFill () const
 Gets the focus fill from the target style.
 
virtual std::unique_ptr< PaintFieldfocusStroke () const
 Gets the focus stroke from the target style.
 
virtual int32_t preEffectCount () const
 Gets the number of pre-effects in the target style.
 
virtual std::unique_ptr< EffectpreEffectAtIndex (const int32_t index_) const
 Gets a pre-effect from the target style by position index.
 
virtual int32_t postEffectCount () const
 Gets the number of post-effects in the target style.
 
virtual std::unique_ptr< EffectpostEffectAtIndex (const int32_t index_) const
 Gets a post-effect from the target style by position index.
 
virtual std::unique_ptr< BlendFieldblendField () const
 Gets the overall art style transparency in the form of a blend field.
 

Friends

aip::ArtStyle * __accessImpl (const ArtStyle &)
 
ArtStyle __accessCtor (aip::ArtStyle *&)
 

Detailed Description

Describes an art style.

Constructor & Destructor Documentation

◆ ArtStyle() [1/3]

hdi::core::ArtStyle::ArtStyle ( )

Constructs an empty ArtStyle object.

Author
GW
Date
08/2013
Note
Empty ArtStyle objects do not relate to any art style in a document; they are designed to be "receivers" of some other ArtStyle object via the overloaded assignment operator. Empty ArtStyle objects are useless until such time (though it is safe to call any of their methods)

◆ ArtStyle() [2/3]

hdi::core::ArtStyle::ArtStyle ( const ArtStyle a_)

ArtStyle copy constructor.

Author
GW
Date
08/2013
Parameters
a_Existing ArtStyle object to copy

◆ ArtStyle() [3/3]

hdi::core::ArtStyle::ArtStyle ( const AIArtStyleHandle  aiArtStyle_)

Constructs a new ArtStyle object from an AIArtStyleHandle.

Author
GW
Date
08/2015
Parameters
aiArtStyle_Raw Illustrator AIArtStyleHandle

◆ ~ArtStyle()

virtual hdi::core::ArtStyle::~ArtStyle ( )
virtual

Destructs an ArtStyle object.

Author
GW
Date
08/2013

Member Function Documentation

◆ aiArtStyleHandle()

virtual AIArtStyleHandle hdi::core::ArtStyle::aiArtStyleHandle ( ) const
virtual

Gets the art style handle around which the target object is wrapped.

Author
GW
Date
11/2013
Returns
AIArtStyleHandle for the target object
Note
Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of functionality provided by Illustrator is not handled by this class (or related classes), then it should probably be added to the hdi_core library.

◆ attributes()

virtual Attributes hdi::core::ArtStyle::attributes ( ) const
virtual

Gets the attributes of the art style.

Author
GW
Date
11/2013
Returns
A bitwise OR of the attributes present in the target style

◆ blendField()

virtual std::unique_ptr< BlendField > hdi::core::ArtStyle::blendField ( ) const
virtual

Gets the overall art style transparency in the form of a blend field.

Author
GW
Date
08/2014
Returns
The blend field object, or NULL for error

◆ focusFill()

virtual std::unique_ptr< PaintField > hdi::core::ArtStyle::focusFill ( ) const
virtual

Gets the focus fill from the target style.

Author
GW
Date
08/2014
Returns
The focus fill paint field object, or NULL for error
Note
If the art style has multiple fills, the user can only edit one at a time. The one currently being edited is the focus fill, and it is shown in the fill/stroke proxies on the Tool and Color panels.

◆ focusStroke()

virtual std::unique_ptr< PaintField > hdi::core::ArtStyle::focusStroke ( ) const
virtual

Gets the focus stroke from the target style.

Author
GW
Date
08/2014
Returns
The focus stroke paint field object, or NULL for error
Note
If the art style has multiple stroke, the user can only edit one at a time. The one currently being edited is the focus stroke, and it is shown in the fill/stroke proxies on the Tool and Color panels.

◆ hasEffects()

virtual bool hdi::core::ArtStyle::hasEffects ( ) const
virtual

Gets whether the style has any live effects.

Author
GW
Date
08/2014
Returns
true if any live effects are present, false otherwise

◆ hasFillOrStroke()

virtual bool hdi::core::ArtStyle::hasFillOrStroke ( ) const
virtual

Gets whether the style has any fill or stroke.

Author
GW
Date
08/2014
Returns
true if a fill or stroke is present, false otherwise

◆ hasTransparency()

virtual bool hdi::core::ArtStyle::hasTransparency ( ) const
virtual

Gets whether the style has any transparency.

Author
GW
Date
08/2014
Returns
true if any non-default transparency info is present, false otherwise

◆ isAnonymous()

virtual bool hdi::core::ArtStyle::isAnonymous ( ) const
virtual

Gets whether an art style is anonymous (named art styles appear in the styles panel)

Author
GW
Date
11/2016
Returns
true if anonymous, false if named

◆ name()

virtual std::string hdi::core::ArtStyle::name ( ) const
virtual

Gets the name of the art style.

Author
GW
Date
08/2013
Returns
The UTF-8 name of the art style, or "" (empty string) if none

◆ operator!=()

virtual bool hdi::core::ArtStyle::operator!= ( const ArtStyle rhs_) const
virtual

Tests whether a given ArtStyle object is not the same as another.

Author
GW
Date
08/2013
Parameters
rhs_ArtStyle to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different styles, false otherwise

◆ operator=()

virtual ArtStyle & hdi::core::ArtStyle::operator= ( const ArtStyle rhs_)
virtual

Overloaded ArtStyle assignment operator.

Author
GW
Date
08/2013
Parameters
rhs_Exists ArtStyle object to copy values from
Returns
The target ArtStyle object, but with its values updated

◆ operator==()

virtual bool hdi::core::ArtStyle::operator== ( const ArtStyle rhs_) const
virtual

Tests whether a given ArtStyle object is the same as another.

Author
GW
Date
08/2013
Parameters
rhs_ArtStyle to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same style, false otherwise

◆ paintFieldAtIndex()

virtual std::unique_ptr< PaintField > hdi::core::ArtStyle::paintFieldAtIndex ( const int32_t  index_) const
virtual

Gets a paint field from the target style by position index.

Author
GW
Date
08/2014
Parameters
index_The position index
Returns
The paint field object, or NULL for error

◆ paintFieldCount()

virtual int32_t hdi::core::ArtStyle::paintFieldCount ( ) const
virtual

Gets the number of paint fields in the target style.

Author
GW
Date
08/2014
Returns
The number of paint fields, or -1 for error

◆ postEffectAtIndex()

virtual std::unique_ptr< Effect > hdi::core::ArtStyle::postEffectAtIndex ( const int32_t  index_) const
virtual

Gets a post-effect from the target style by position index.

Author
GW
Date
08/2014
Parameters
index_The position index
Returns
The effect object, or NULL for error

◆ postEffectCount()

virtual int32_t hdi::core::ArtStyle::postEffectCount ( ) const
virtual

Gets the number of post-effects in the target style.

Author
GW
Date
08/2014
Returns
The number of post-effects, or -1 for error

◆ preEffectAtIndex()

virtual std::unique_ptr< Effect > hdi::core::ArtStyle::preEffectAtIndex ( const int32_t  index_) const
virtual

Gets a pre-effect from the target style by position index.

Author
GW
Date
08/2014
Parameters
index_The position index
Returns
The effect object, or NULL for error

◆ preEffectCount()

virtual int32_t hdi::core::ArtStyle::preEffectCount ( ) const
virtual

Gets the number of pre-effects in the target style.

Author
GW
Date
08/2014
Returns
The number of pre-effects, or -1 for error

◆ setName()

virtual void hdi::core::ArtStyle::setName ( const std::string &  name_)
virtual

Sets the name of the art style.

Author
GW
Date
08/2013
Parameters
name_New name for the art style, as UTF-8

◆ styleType()

virtual Type hdi::core::ArtStyle::styleType ( ) const
virtual

Gets the type of the art style.

Author
GW
Date
11/2013
Returns
A enum value for the style type

◆ valid()

virtual bool hdi::core::ArtStyle::valid ( )
virtual

Tests the validity of the target style by searching for it in the document.

Author
GW
Date
11/2013
Returns
true for a valid art style, false otherwise

◆ visible()

virtual bool hdi::core::ArtStyle::visible ( ) const
virtual

Gets whether the style is visible.

Author
GW
Date
08/2014
Returns
true if visible, false otherwise
Note
A style is considered invisible if there are no effects, all the paint fields have a color of none, and the overall transparency contains default values.