Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
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.
 
 PaintField (const PaintField &pf_)
 Constructs a new PaintField object from another existing object.
 
virtual ~PaintField ()
 Destructs a PaintField object.
 
PaintFieldoperator= (const PaintField &rhs_)
 Overloaded assignment operator to copy data from the given PaintField object into the target.
 
bool isEmpty () const
 Gets whether the target PaintField object is empty (constructed with the default ctor)
 
bool visible () const
 Gets the visibility status of blend of a paint field (fill/stroke), which affects whether the blend is drawn.
 
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.
 
bool isFill () const
 Reports whether a paint field corresponds to a fill.
 
bool fill (FillStyle &fs__, PaintData &pd__)
 Gets fill information from a paint field.
 
void setFill (const FillStyle &fs_, const PaintData &pd_)
 Sets fill information for a paint field.
 
bool isStroke () const
 Reports whether a paint field corresponds to a stroke.
 
bool stroke (StrokeStyle &ss__, PaintData &pd__)
 Gets stroke information from a paint field.
 
void setStroke (const StrokeStyle &ss_, const PaintData &pd_)
 Sets stroke information for a paint field.
 
int32_t colorPosition () const
 Gets the color position of a paint field (the point in effect order at which painting occurs)
 
void setColorPosition (const int32_t pos_)
 Sets the color position of a paint field (the point in effect order at which painting occurs)
 
bool evenOdd () const
 Gets the even-odd fill rule for a paint field.
 
void setEvenOdd (const bool eo_)
 Sets the even-odd fill rule for a paint field.
 
int32_t effectCount () const
 Gets the number of effects in a paint field.
 
std::unique_ptr< EffecteffectAtIndex (const int32_t index_) const
 Gets a effect from a paint field by position index.
 
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.
 
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.
 
std::unique_ptr< BlendFieldblend () const
 Gets the blend field for the paint field.
 

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

◆ PaintField() [1/2]

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).

◆ PaintField() [2/2]

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

◆ ~PaintField()

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

Destructs a PaintField object.

Author
GW
Date
08/2014

Member Function Documentation

◆ blend()

std::unique_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

◆ colorPosition()

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

◆ effectAtIndex()

std::unique_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

◆ effectCount()

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

◆ evenOdd()

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

◆ fill()

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

◆ isEmpty()

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

◆ isFill()

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

◆ isStroke()

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

◆ liveEffectInfo()

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.

◆ operator=()

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

◆ setColorPosition()

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

◆ setEvenOdd()

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

◆ setFill()

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

◆ setLiveEffectInfo()

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

◆ setStroke()

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

◆ setVisible()

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

◆ stroke()

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

◆ visible()

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