Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
|
Handles general gradient-related functionality. More...
#include <hdicoreGradient.h>
Classes | |
class | Stop |
Describes the attributes of a gradient stop. More... | |
Public Types | |
enum | Type { UnknownGradientType = 0 , LinearGradientType = 10 , RadialGradientType = 20 } |
Indicates the type of "gradient" an object is representing. | |
typedef std::unique_ptr< Stop > | StopUP |
typedef std::shared_ptr< Stop > | StopSP |
typedef std::weak_ptr< Stop > | StopWP |
Public Member Functions | |
Gradient () | |
Constructs an empty Gradient object. | |
Gradient (const Gradient &grad_) | |
Constructs a new Gradient object from an existing Gradient object (copy constructor) | |
virtual | ~Gradient () |
Gradient object destructor. | |
virtual Gradient & | operator= (const Gradient &rhs_) |
Assigns one Gradient object to another. | |
virtual bool | dispose () |
Removes the gradient from its document. | |
virtual AIGradientHandle | aiGradientHandle () const |
Gets the gradient handle around which the target object is wrapped. | |
virtual bool | isEmpty () const |
Gets whether the target Gradient object is empty (constructed with the default ctor) | |
virtual bool | valid () const |
Tests the validity of the target gradient by searching for it in the document. | |
virtual Type | gradientType () const |
Gets the type of gradient the target object is representing. | |
virtual void | setGradientType (const Type type_) |
Sets the type of gradient the target object is representing. | |
virtual bool | operator== (const Gradient &rhs_) const |
Tests whether a given Gradient object is the same as another. | |
virtual bool | operator!= (const Gradient &rhs_) const |
Tests whether a given Gradient object is not the same as another. | |
virtual std::string | name () const |
Gets the name of the gradient. | |
virtual void | setName (const std::string &name_) |
Sets the name of the gradient. | |
virtual int16_t | stopCount () const |
Gets the number of stops (color transition or ramp points) in the target gradient. | |
virtual std::unique_ptr< Stop > | stopAtIndex (const int16_t index_) |
Gets a gradient stop at the given index. | |
virtual bool | setStopAtIndex (const int16_t index_, const Stop &stop_) |
Sets a gradient stop at the given index. | |
virtual bool | insertStopAtIndex (const int16_t index_, Stop &stop__) |
Inserts a gradient stop at the given index. | |
virtual bool | removeStopAtIndex (const int16_t index_, Stop &stop__) |
Removes a gradient stop at the given index. | |
virtual bool | colorAtPosition (const double tVal_, ArtColor &color__) |
Gets the color at a given "t-value" (position) on a gradient ramp. | |
Static Public Member Functions | |
static Gradient | create () |
Creates a new Gradient object (and Illustrator gradient) | |
Protected Member Functions | |
void * | _impl () const |
Internal use only. | |
Protected Attributes | |
void * | _data |
Private implementation data. | |
Friends | |
aip::Gradient * | __accessImpl (const Gradient &) |
Gradient | __accessCtor (aip::Gradient *&) |
Handles general gradient-related functionality.
hdi::core::Gradient::Gradient | ( | ) |
Constructs an empty Gradient object.
hdi::core::Gradient::Gradient | ( | const Gradient & | grad_ | ) |
|
virtual |
Gradient object destructor.
|
protected |
Internal use only.
|
virtual |
Gets the gradient handle around which the target object is wrapped.
|
virtual |
Gets the color at a given "t-value" (position) on a gradient ramp.
tVal_ | The point on the ramp, a percentage value in the range [0,1] |
color__ | Return-by-reference for the color at the given position |
|
static |
|
virtual |
Removes the gradient from its document.
|
virtual |
Gets the type of gradient the target object is representing.
|
virtual |
Inserts a gradient stop at the given index.
index_ | The position at which to add this stop, in the range [0,stopCount] |
stop__ | Return-by-reference for the newly inserted gradient stop |
|
virtual |
|
virtual |
Gets the name of the gradient.
|
virtual |
|
virtual |
|
virtual |
Removes a gradient stop at the given index.
index_ | The position of the stop to remove, in the range [0,stopCount-1] |
stop__ | Return-by-reference for the gradient stop that was removed |
|
virtual |
Sets the type of gradient the target object is representing.
type_ | Enum value indicating the new type of the underlying gradient |
|
virtual |
Sets the name of the gradient.
name_ | New name for the gradient, as UTF-8 |
|
virtual |
Sets a gradient stop at the given index.
index_ | Index of the stop to modify, in the range [0,stopCount-1] |
stop_ | New gradient stop settings |
|
virtual |
Gets a gradient stop at the given index.
index_ | Index of the desired stop, in the range [0,stopCount-1] |
|
virtual |
Gets the number of stops (color transition or ramp points) in the target gradient.
|
virtual |
Tests the validity of the target gradient by searching for it in the document.