Changeset View
Changeset View
Standalone View
Standalone View
libs/pigment/KoBasicHistogramProducers.cpp
Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Line(s) | |||||
228 | 228 | | |||
229 | QString KoBasicF32HistogramProducer::positionToString(qreal pos) const | 229 | QString KoBasicF32HistogramProducer::positionToString(qreal pos) const | ||
230 | { | 230 | { | ||
231 | return QString("%1").arg(static_cast<float>(pos)); // XXX I doubt this is correct! | 231 | return QString("%1").arg(static_cast<float>(pos)); // XXX I doubt this is correct! | ||
232 | } | 232 | } | ||
233 | 233 | | |||
234 | qreal KoBasicF32HistogramProducer::maximalZoom() const | 234 | qreal KoBasicF32HistogramProducer::maximalZoom() const | ||
235 | { | 235 | { | ||
236 | // XXX What _is_ the maximal zoom here? I don't think there is one with floats, so this seems a fine compromis for the moment | 236 | // XXX What _is_ the maximal zoom here? I don't think there is one with floats, so this seems a fine compromise for the moment | ||
237 | return 1.0 / 255.0; | 237 | return 1.0 / 255.0; | ||
238 | } | 238 | } | ||
239 | 239 | | |||
240 | void KoBasicF32HistogramProducer::addRegionToBin(const quint8 * pixels, const quint8 * selectionMask, quint32 nPixels, const KoColorSpace *cs) | 240 | void KoBasicF32HistogramProducer::addRegionToBin(const quint8 * pixels, const quint8 * selectionMask, quint32 nPixels, const KoColorSpace *cs) | ||
241 | { | 241 | { | ||
242 | // The view | 242 | // The view | ||
243 | float from = static_cast<float>(m_from); | 243 | float from = static_cast<float>(m_from); | ||
244 | float width = static_cast<float>(m_width); | 244 | float width = static_cast<float>(m_width); | ||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | |||||
303 | 303 | | |||
304 | QString KoBasicF16HalfHistogramProducer::positionToString(qreal pos) const | 304 | QString KoBasicF16HalfHistogramProducer::positionToString(qreal pos) const | ||
305 | { | 305 | { | ||
306 | return QString("%1").arg(static_cast<float>(pos)); // XXX I doubt this is correct! | 306 | return QString("%1").arg(static_cast<float>(pos)); // XXX I doubt this is correct! | ||
307 | } | 307 | } | ||
308 | 308 | | |||
309 | qreal KoBasicF16HalfHistogramProducer::maximalZoom() const | 309 | qreal KoBasicF16HalfHistogramProducer::maximalZoom() const | ||
310 | { | 310 | { | ||
311 | // XXX What _is_ the maximal zoom here? I don't think there is one with floats, so this seems a fine compromis for the moment | 311 | // XXX What _is_ the maximal zoom here? I don't think there is one with floats, so this seems a fine compromise for the moment | ||
312 | return 1.0 / 255.0; | 312 | return 1.0 / 255.0; | ||
313 | } | 313 | } | ||
314 | 314 | | |||
315 | void KoBasicF16HalfHistogramProducer::addRegionToBin(const quint8 * pixels, const quint8 * selectionMask, quint32 nPixels, const KoColorSpace *cs) | 315 | void KoBasicF16HalfHistogramProducer::addRegionToBin(const quint8 * pixels, const quint8 * selectionMask, quint32 nPixels, const KoColorSpace *cs) | ||
316 | { | 316 | { | ||
317 | // The view | 317 | // The view | ||
318 | float from = static_cast<float>(m_from); | 318 | float from = static_cast<float>(m_from); | ||
319 | float width = static_cast<float>(m_width); | 319 | float width = static_cast<float>(m_width); | ||
▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines |