| 245 | } |
| 246 | |
| 247 | bool MultiGradient::remove(double position) |
| 248 | { |
| 249 | if (position < 0 + std::numeric_limits<double>::epsilon() || position > 100 - std::numeric_limits<double>::epsilon()) |
| 250 | { |
| 251 | return false; |
| 252 | } |
| 253 | |
| 254 | map<double, QColor>::iterator it = pos_col_.find(position); |
| 255 | if (it != pos_col_.end()) |
| 256 | { |
| 257 | pos_col_.erase(it); |
| 258 | return true; |
| 259 | } |
| 260 | return false; |
| 261 | } |
| 262 | |
| 263 | // static |
| 264 | MultiGradient MultiGradient::getDefaultGradientLinearIntensityMode() |