Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Member Functions | Friends | List of all members
hdi::core::ArtStyle::PaintField Class Reference

Corresponds to either a fill or a stroke in an art style. Each paint field can also contain live effects and transparency information. More...

#include <hdicoreArtStyle.h>

Public Member Functions

 PaintField ()
 Constructs an empty PaintField object. More...
 
 PaintField (const PaintField &pf_)
 Constructs a new PaintField object from another existing object. More...
 
virtual ~PaintField ()
 Destructs a PaintField object. More...
 
PaintFieldoperator= (const PaintField &rhs_)
 Overloaded assignment operator to copy data from the given PaintField object into the target. More...
 
bool isEmpty () const
 Gets whether the target PaintField object is empty (constructed with the default ctor) More...
 
bool visible () const
 Gets the visibility status of blend of a paint field (fill/stroke), which affects whether the blend is drawn. More...
 
void setVisible (const bool visible_)
 Sets the visibility status of blend of a paint field (fill/stroke), which affects whether the blend is drawn. This is applied to all the art objects currently targeted in the document. More...
 
bool isFill () const
 Reports whether a paint field corresponds to a fill. More...
 
bool fill (FillStyle &fs__, PaintData &pd__)
 Gets fill information from a paint field. More...
 
void setFill (const FillStyle &fs_, const PaintData &pd_)
 Sets fill information for a paint field. More...
 
bool isStroke () const
 Reports whether a paint field corresponds to a stroke. More...
 
bool stroke (StrokeStyle &ss__, PaintData &pd__)
 Gets stroke information from a paint field. More...
 
void setStroke (const StrokeStyle &ss_, const PaintData &pd_)
 Sets stroke information for a paint field. More...
 
int32_t colorPosition () const
 Gets the color position of a paint field (the point in effect order at which painting occurs) More...
 
void setColorPosition (const int32_t pos_)
 Sets the color position of a paint field (the point in effect order at which painting occurs) More...
 
bool evenOdd () const
 Gets the even-odd fill rule for a paint field. More...
 
void setEvenOdd (const bool eo_)
 Sets the even-odd fill rule for a paint field. More...
 
int32_t effectCount () const
 Gets the number of effects in a paint field. More...
 
std::auto_ptr< EffecteffectAtIndex (const int32_t index_) const
 Gets a effect from a paint field by position index. More...
 
bool liveEffectInfo (LiveEffect &le__, LiveEffect::Parameters &p__)
 Retrieves live effect and/or parameter objects for effects in a paint field that substitute for the built-in fill or stroke behavior. More...
 
void setLiveEffectInfo (const LiveEffect &le_, const LiveEffect::Parameters &p_)
 Sets the live effect and/or parameter references for effects in a paint field that substitute for the built-in fill or stroke behavior. More...
 
std::auto_ptr< BlendFieldblend () const
 Gets the blend field for the paint field. More...
 

Friends

class ArtStyle
 

Detailed Description

Corresponds to either a fill or a stroke in an art style. Each paint field can also contain live effects and transparency information.

Constructor & Destructor Documentation

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

Constructs an empty PaintField object.

Author
GW
Date
08/2014
Note
To test if a PaintField object is empty, call isEmpty() on it
Empty PaintField objects do not relate to any actual art style paint field; they are designed to be "receivers" of some other PaintField object via the overloaded assignment operator. Empty PaintField objects are useless until such time (though it is safe to call any of their methods).
hdi::core::ArtStyle::PaintField::PaintField ( const PaintField pf_)

Constructs a new PaintField object from another existing object.

Author
GW
Date
08/2014
Parameters
pf_Existing object to copy
virtual hdi::core::ArtStyle::PaintField::~PaintField ( )
virtual

Destructs a PaintField object.

Author
GW
Date
08/2014

Member Function Documentation

std::auto_ptr<BlendField> hdi::core::ArtStyle::PaintField::blend ( ) const

Gets the blend field for the paint field.

Author
GW
Date
08/2014
Returns
The blend field object for the paint field, or NULL for error
int32_t hdi::core::ArtStyle::PaintField::colorPosition ( ) const

Gets the color position of a paint field (the point in effect order at which painting occurs)

Author
GW
Date
08/2014
Returns
The paint field color position
std::auto_ptr<Effect> hdi::core::ArtStyle::PaintField::effectAtIndex ( const int32_t  index_) const

Gets a effect from a paint field by position index.

Author
GW
Date
08/2014
Parameters
index_The position index
Returns
The effect object, or NULL for error
int32_t hdi::core::ArtStyle::PaintField::effectCount ( ) const

Gets the number of effects in a paint field.

Author
GW
Date
08/2014
Returns
The number of effects
bool hdi::core::ArtStyle::PaintField::evenOdd ( ) const

Gets the even-odd fill rule for a paint field.

Author
GW
Date
08/2014
Returns
true if the even-odd rule is used to determine path insideness
bool hdi::core::ArtStyle::PaintField::fill ( FillStyle fs__,
PaintData pd__ 
)

Gets fill information from a paint field.

Author
GW
Date
08/2014
Parameters
fs__Return-by-reference for the fill style
pd__Return-by-reference for the paint data
Returns
true if the fill style and paint data could be acquired, false otherwise
bool hdi::core::ArtStyle::PaintField::isEmpty ( ) const

Gets whether the target PaintField object is empty (constructed with the default ctor)

Author
GW
Date
08/2013
Returns
true if the target PaintField object is empty, false otherwise
bool hdi::core::ArtStyle::PaintField::isFill ( ) const

Reports whether a paint field corresponds to a fill.

Author
GW
Date
08/2014
Returns
true if the paint field is for a fill
bool hdi::core::ArtStyle::PaintField::isStroke ( ) const

Reports whether a paint field corresponds to a stroke.

Author
GW
Date
08/2014
Returns
true if the paint field is for a stroke
bool hdi::core::ArtStyle::PaintField::liveEffectInfo ( LiveEffect le__,
LiveEffect::Parameters p__ 
)

Retrieves live effect and/or parameter objects for effects in a paint field that substitute for the built-in fill or stroke behavior.

Author
GW
Date
08/2014
Parameters
le__Return-by-reference for the live effect
p__Return-by-reference for the effect params
Returns
true if the live effect and/or parameter objects were acquired, false otherwise
Note
Current examples of strokes with an effect are brushes and inside/outside aligned strokes, which are implemented as live effects that replace the default stroking behavior. The only current example of a paint field that returns an empty live effect object but non-empty parameters are strokes with dash adjustment, arrowheads, or other beautiful strokes options.
PaintField& hdi::core::ArtStyle::PaintField::operator= ( const PaintField rhs_)

Overloaded assignment operator to copy data from the given PaintField object into the target.

Author
GW
Date
08/2014
Parameters
rhs_Righthand side of the assignment operator
Returns
The lefthand side of the assignment operator, but with its values updated
void hdi::core::ArtStyle::PaintField::setColorPosition ( const int32_t  pos_)

Sets the color position of a paint field (the point in effect order at which painting occurs)

Author
GW
Date
08/2014
Parameters
pos_The new paint field color position
void hdi::core::ArtStyle::PaintField::setEvenOdd ( const bool  eo_)

Sets the even-odd fill rule for a paint field.

Author
GW
Date
08/2014
Parameters
eo_true if the even-odd rule should be used to determine path insideness
void hdi::core::ArtStyle::PaintField::setFill ( const FillStyle fs_,
const PaintData pd_ 
)

Sets fill information for a paint field.

Author
GW
Date
08/2014
Parameters
fs_New fill style
pd_New paint data
void hdi::core::ArtStyle::PaintField::setLiveEffectInfo ( const LiveEffect le_,
const LiveEffect::Parameters p_ 
)

Sets the live effect and/or parameter references for effects in a paint field that substitute for the built-in fill or stroke behavior.

Author
GW
Date
08/2014
Parameters
le_The new live effect; pass an empty one to remove the existing live effect
p_The new effect params; pass an empty one to remove the existing effect params
void hdi::core::ArtStyle::PaintField::setStroke ( const StrokeStyle ss_,
const PaintData pd_ 
)

Sets stroke information for a paint field.

Author
GW
Date
08/2014
Parameters
ss_New stroke style
pd_New paint data
void hdi::core::ArtStyle::PaintField::setVisible ( const bool  visible_)

Sets the visibility status of blend of a paint field (fill/stroke), which affects whether the blend is drawn. This is applied to all the art objects currently targeted in the document.

Author
GW
Date
08/2014
Parameters
visible_true if the blend field should be visible, false otherwise
bool hdi::core::ArtStyle::PaintField::stroke ( StrokeStyle ss__,
PaintData pd__ 
)

Gets stroke information from a paint field.

Author
GW
Date
08/2014
Parameters
ss__Return-by-reference for the stroke style
pd__Return-by-reference for the paint data
Returns
true if the stroke style and paint data could be acquired, false otherwise
bool hdi::core::ArtStyle::PaintField::visible ( ) const

Gets the visibility status of blend of a paint field (fill/stroke), which affects whether the blend is drawn.

Author
GW
Date
08/2014
Returns
true if the blend field is visible, false otherwise