Gnash
0.8.11dev
|
#include <FillStyle.h>
Public Types | |
enum | Type { LINEAR, RADIAL } |
The type of GradientFill. More... | |
enum | SpreadMode { PAD, REPEAT, REFLECT } |
enum | InterpolationMode { RGB, LINEAR_RGB } |
typedef std::vector< GradientRecord > | GradientRecords |
Public Member Functions | |
GradientFill (Type t, const SWFMatrix &m, const GradientRecords &=GradientRecords()) | |
Construct a GradientFill. More... | |
Type | type () const |
const SWFMatrix & | matrix () const |
void | setLerp (const GradientFill &a, const GradientFill &b, double ratio) |
Set this fill to a lerp of two other GradientFills. More... | |
void | setRecords (const GradientRecords &recs) |
const GradientRecords & | getRecords () const |
size_t | recordCount () const |
Get the number of records in this GradientFill. More... | |
const GradientRecord & | record (size_t i) const |
Query the GradientRecord at the specified index. More... | |
void | setFocalPoint (double d) |
Set the focal point. More... | |
double | focalPoint () const |
Get the focal point of this GradientFill. More... | |
Public Attributes | |
SpreadMode | spreadMode |
InterpolationMode | interpolation |
A GradientFill.
typedef std::vector<GradientRecord> gnash::GradientFill::GradientRecords |
The type of GradientFill.
A Radial fill is a gradient fill with a focal point.
Enumerator | |
---|---|
LINEAR | |
RADIAL |
gnash::GradientFill::GradientFill | ( | Type | t, |
const SWFMatrix & | m, | ||
const GradientRecords & | recs = GradientRecords() |
||
) |
Construct a GradientFill.
Optionally the records can be passed here. The actual matrix of the gradient depends on the type; the constructor handles this, and users should just pass the user matrix.
|
inline |
Get the focal point of this GradientFill.
If the focal point is 0.0, it is a simple radial fill.
Referenced by gnash::StyleHandler::addFocalGradient(), gnash::renderer::openvg::StyleHandler::operator()(), and gnash::readFills().
|
inline |
Referenced by gnash::renderer::openvg::StyleHandler::operator()().
|
inline |
References gnash::key::a, gnash::key::b, gnash::GradientRecord::ratio, and gnash::setLerp().
Referenced by gnash::renderer::openvg::StyleHandler::operator()(), gnash::AddStyles::operator()(), gnash::operator<<(), and setLerp().
|
inline |
Query the GradientRecord at the specified index.
There are recordCount() records.
References gnash::key::d, and gnash::key::i.
Referenced by gnash::AggStyle::color(), gnash::Renderer_cairo::getPixel(), and setLerp().
|
inline |
Get the number of records in this GradientFill.
Referenced by gnash::AggStyle::color(), gnash::Renderer_cairo::getPixel(), gnash::operator<<(), and setLerp().
void gnash::GradientFill::setFocalPoint | ( | double | d | ) |
Set the focal point.
Value will be clamped to the range -1..1; callers don't need to check.
References gnash::key::d.
Referenced by gnash::readFills().
void gnash::GradientFill::setLerp | ( | const GradientFill & | a, |
const GradientFill & | b, | ||
double | ratio | ||
) |
Set this fill to a lerp of two other GradientFills.
References gnash::GradientRecord::color, gnash::key::e, gnash::frnd(), gnash::key::i, gnash::lerp(), matrix(), gnash::GradientRecord::ratio, record(), recordCount(), gnash::SWFMatrix::set_lerp(), gnash::BitmapFill::type(), and type().
|
inline |
Referenced by gnash::readFills().
|
inline |
Referenced by gnash::renderer::openvg::StyleHandler::operator()(), gnash::operator<<(), and setLerp().
InterpolationMode gnash::GradientFill::interpolation |
Referenced by gnash::operator<<(), and gnash::readFills().
SpreadMode gnash::GradientFill::spreadMode |
Referenced by gnash::operator<<(), and gnash::readFills().