15 : mSpreadMethod(pGradient->getSpreadMethod()), mColorData(NULL), mIndex(0), mHelp(0.0)
21 this->
mColorData =
new unsigned char[4 * iMax];
24 std::string stopColor;
25 std::map<std::string, CLRGBAColor>::const_iterator pos;
27 std::list<std::pair<double, unsigned int> >::reverse_iterator last;
29 for (i = 0; i < iMax; ++i)
32 assert(pStop != NULL);
34 assert(stopColor.find_first_not_of(
" \t\n\r") != std::string::npos && stopColor !=
"none");
35 pos = colormap.find(stopColor);
36 assert(pos != colormap.end());
63 mStops.push_back(std::pair<double, unsigned int>(v, this->
mIndex));
64 last = this->
mStops.rbegin();
81 this->
mStops.push_back(std::pair<double, unsigned int>(0.0, 0));
160 if (val > this->
mTmp->first)
196 if (((
unsigned int)floor(value)) % 2 != 0)
198 value = 1.0 - (value - floor(value));
202 value = value - floor(value);
210 value = value - floor(value);
214 else if (value > 1.0)
228 if (((
unsigned int)floor(value)) % 2 != 0)
230 value = 1.0 - (value - floor(value));
234 value = value - floor(value);
241 value = value - floor(value);
std::list< std::pair< double, unsigned int > >::const_iterator mEnd
void adjust_value(double &value) const
void update_color(double val)
std::list< std::pair< double, unsigned int > > mStops
double getRelativeValue() const
CLGradientStop * getGradientStop(size_t i)
CLGradientBase::SPREADMETHOD mSpreadMethod
unsigned char * mColorData
size_t getNumGradientStops() const
const std::string & getStopColor() const
const CLRelAbsVector & getOffset() const
CLGradientStops(const CLGradientBase *pGradient, const std::map< std::string, CLRGBAColor > &colormap)
std::list< std::pair< double, unsigned int > >::const_iterator mCurrentPosition
const CLRGBAColor & color() const
std::list< std::pair< double, unsigned int > >::const_iterator mBegin
std::list< std::pair< double, unsigned int > >::const_iterator mTmp