COPASI API
4.16.103
|
#include <CLGradientStops.h>
Public Member Functions | |
CLGradientStops (const CLGradientBase *pGradient, const std::map< std::string, CLRGBAColor > &colormap) | |
const CLRGBAColor & | color () const |
void | update_color (double val) |
~CLGradientStops () | |
Protected Member Functions | |
void | adjust_value (double &value) const |
Protected Attributes | |
std::list< std::pair< double, unsigned int > >::const_iterator | mBegin |
CLRGBAColor | mColor |
unsigned char * | mColorData |
std::list< std::pair< double, unsigned int > >::const_iterator | mCurrentPosition |
std::list< std::pair< double, unsigned int > >::const_iterator | mEnd |
double | mHelp |
unsigned int | mIndex |
CLGradientBase::SPREADMETHOD | mSpreadMethod |
std::list< std::pair< double, unsigned int > > | mStops |
std::list< std::pair< double, unsigned int > >::const_iterator | mTmp |
Definition at line 25 of file CLGradientStops.h.
CLGradientStops::CLGradientStops | ( | const CLGradientBase * | pGradient, |
const std::map< std::string, CLRGBAColor > & | colormap | ||
) |
Definition at line 14 of file CLGradientStops.cpp.
References CLGradientBase::getGradientStop(), CLGradientBase::getNumGradientStops(), CLGradientStop::getOffset(), CLRelAbsVector::getRelativeValue(), CLGradientStop::getStopColor(), mBegin, mColorData, mCurrentPosition, mEnd, mIndex, and mStops.
CLGradientStops::~CLGradientStops | ( | ) |
|
protected |
This method takes the given offset value and adjust it if it is outside the rangr from 0.0 to 1.0 depending on the spread method that has been set from the gradient.
Definition at line 179 of file CLGradientStops.cpp.
References mSpreadMethod, CLGradientBase::PAD, CLGradientBase::REFLECT, and CLGradientBase::REPEAT.
Referenced by update_color().
const CLRGBAColor & CLGradientStops::color | ( | ) | const |
Definition at line 174 of file CLGradientStops.cpp.
References mColor.
Referenced by CLLayoutRenderer::create_linear_gradient_texture(), and CLLayoutRenderer::create_radial_gradient_texture().
void CLGradientStops::update_color | ( | double | val | ) |
Given a relative value, this routine returns a const pointer to an rgba value that is 4 unsigned char long. If the gradient that was used to create the CLGradientStops object didn't have any gradient stops, the color that is returned is completly transparent black.
Definition at line 104 of file CLGradientStops.cpp.
References adjust_value(), CLRGBAColor::mA, CLRGBAColor::mB, mBegin, mColor, mColorData, mCurrentPosition, mEnd, CLRGBAColor::mG, mHelp, mIndex, CLRGBAColor::mR, and mTmp.
Referenced by CLLayoutRenderer::create_linear_gradient_texture(), and CLLayoutRenderer::create_radial_gradient_texture().
|
protected |
Definition at line 38 of file CLGradientStops.h.
Referenced by CLGradientStops(), and update_color().
|
protected |
Definition at line 48 of file CLGradientStops.h.
Referenced by color(), and update_color().
|
protected |
Definition at line 31 of file CLGradientStops.h.
Referenced by CLGradientStops(), update_color(), and ~CLGradientStops().
|
protected |
Definition at line 40 of file CLGradientStops.h.
Referenced by CLGradientStops(), and update_color().
|
protected |
Definition at line 39 of file CLGradientStops.h.
Referenced by CLGradientStops(), and update_color().
|
protected |
Definition at line 52 of file CLGradientStops.h.
Referenced by update_color().
|
protected |
Definition at line 44 of file CLGradientStops.h.
Referenced by CLGradientStops(), and update_color().
|
protected |
Definition at line 28 of file CLGradientStops.h.
Referenced by adjust_value().
|
protected |
Definition at line 35 of file CLGradientStops.h.
Referenced by CLGradientStops().
|
protected |
Definition at line 41 of file CLGradientStops.h.
Referenced by update_color().