diff --git a/lib/jkqtplotter/graphs/jkqtpimage.cpp b/lib/jkqtplotter/graphs/jkqtpimage.cpp index a8f94a8c30..39e735e3a5 100644 --- a/lib/jkqtplotter/graphs/jkqtpimage.cpp +++ b/lib/jkqtplotter/graphs/jkqtpimage.cpp @@ -1062,12 +1062,12 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, dou void JKQTPColumnMathImage::setImageColumn(size_t __value) { - setImageColumn(static_cast(__value)); + setImageColumn(static_cast(__value)); } void JKQTPColumnMathImage::setModifierColumn(size_t __value) { - setImageColumn(static_cast(__value)); + setModifierColumn(static_cast(__value)); } void JKQTPColumnMathImage::setImageColumn(int __value) { diff --git a/lib/jkqtplotter/jkqtpimagetools.cpp b/lib/jkqtplotter/jkqtpimagetools.cpp index b81905b5f3..3b40ad3cdb 100644 --- a/lib/jkqtplotter/jkqtpimagetools.cpp +++ b/lib/jkqtplotter/jkqtpimagetools.cpp @@ -615,25 +615,26 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside(JKQTPEnhance double internalModifierMin=0; double internalModifierMax=0; cbGetDataMinMax(internalDataMin, internalDataMax); - cbGetModifierDataMinMax(internalDataMin, internalDataMax); + cbGetModifierDataMinMax(internalModifierMin, internalModifierMax); uint8_t h=1; - static const uint8_t dSize = 200*h; if (modifierMode!=JKQTPMathImageModifierMode::ModifyNone) { h=50; } + const uint8_t steps=200; + const int dSize = steps*h; std::vector d(dSize, 0.0); std::vector dd(dSize, 0.0); - for (uint8_t i=0; i(d.data(),h,dSize/h, b, palette, 0, dSize/h-1); + QImage b(h, steps, QImage::Format_ARGB32); + JKQTPImageTools::array2image(d.data(),h, steps, b, palette, 0, steps-1); if (modifierMode!=JKQTPMathImageModifierMode::ModifyNone) { - modifyImage(b, dd.data(), JKQTPMathImageDataType::DoubleArray, h,dSize/h, 0, h-1); + modifyImage(b, dd.data(), JKQTPMathImageDataType::DoubleArray, h, steps, 0, h-1); } if (colorBarRightVisible) {