7#ifndef __HDI_CORE_GRADIENT__
8#define __HDI_CORE_GRADIENT__
10#if defined(HDI_CORE_AIP_MODE)
34 UnknownGradientType = 0,
35 LinearGradientType = 10,
36 RadialGradientType = 20
101 const double opacity_
122 typedef std::unique_ptr<Stop> StopUP;
123 typedef std::shared_ptr<Stop> StopSP;
124 typedef std::weak_ptr<Stop> StopWP;
263 virtual std::string
name()
const;
272 virtual void setName(
const std::string& name_);
359 friend aip::Gradient* __accessImpl(
const Gradient&);
360 friend Gradient __accessCtor(aip::Gradient*&);
370 typedef std::unique_ptr<Gradient> GradientUP;
371 typedef std::shared_ptr<Gradient> GradientSP;
372 typedef std::weak_ptr<Gradient> GradientWP;
374 extern aip::Gradient* __accessImpl(
const Gradient&);
375 extern Gradient __accessCtor(aip::Gradient*&);
Describes the color of art on the artboard.
Definition: hdicoreArtColor.h:40
Describes the attributes of a gradient stop.
Definition: hdicoreGradient.h:43
double opacity
The opacity value for the gradient stop, in the range [0,1]. 0 is completely transparent and 1 is com...
Definition: hdicoreGradient.h:69
Stop(const double midPt_, const double rampPt_, const ArtColor &color_, const double opacity_)
Constructs a new Stop object with the given values.
double midPoint
The location between two ramp points where there is an equal mix of this color and the color of the n...
Definition: hdicoreGradient.h:51
ArtColor color
The color for the target gradient stop.
Definition: hdicoreGradient.h:63
double rampPoint
The position on the blend ramp where this color begins, in the range [0,1]. The first point does not ...
Definition: hdicoreGradient.h:58
Stop()
Constructs a new Stop object with default values.
Stop & operator=(const Stop &rhs_)
Overloaded assignment operator to copy values from one Stop object to another.
virtual ~Stop()
Destructs a Stop object.
Stop(const Stop &s_)
Constructs a new Stop object with values from an existing Stop.
Handles general gradient-related functionality.
Definition: hdicoreGradient.h:27
void * _data
Private implementation data.
Definition: hdicoreGradient.h:348
virtual bool operator!=(const Gradient &rhs_) const
Tests whether a given Gradient object is not the same as another.
virtual bool operator==(const Gradient &rhs_) const
Tests whether a given Gradient object is the same as another.
virtual void setName(const std::string &name_)
Sets the name of the gradient.
virtual bool setStopAtIndex(const int16_t index_, const Stop &stop_)
Sets a gradient stop at the given index.
void * _impl() const
Internal use only.
virtual Gradient & operator=(const Gradient &rhs_)
Assigns one Gradient object to another.
static Gradient create()
Creates a new Gradient object (and Illustrator gradient)
Gradient(const Gradient &grad_)
Constructs a new Gradient object from an existing Gradient object (copy constructor)
virtual AIGradientHandle aiGradientHandle() const
Gets the gradient handle around which the target object is wrapped.
virtual bool colorAtPosition(const double tVal_, ArtColor &color__)
Gets the color at a given "t-value" (position) on a gradient ramp.
Gradient()
Constructs an empty Gradient object.
virtual bool removeStopAtIndex(const int16_t index_, Stop &stop__)
Removes a gradient stop at the given index.
virtual void setGradientType(const Type type_)
Sets the type of gradient the target object is representing.
Type
Indicates the type of "gradient" an object is representing.
Definition: hdicoreGradient.h:33
virtual Type gradientType() const
Gets the type of gradient the target object is representing.
virtual bool dispose()
Removes the gradient from its document.
virtual ~Gradient()
Gradient object destructor.
virtual int16_t stopCount() const
Gets the number of stops (color transition or ramp points) in the target gradient.
virtual bool insertStopAtIndex(const int16_t index_, Stop &stop__)
Inserts a gradient stop at the given index.
virtual std::unique_ptr< Stop > stopAtIndex(const int16_t index_)
Gets a gradient stop at the given index.
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 std::string name() const
Gets the name of the gradient.
Header file for art color manipulation.