Closed J4nsen closed 7 years ago
The problem is that every time the hue changes, it has to re-calculate the colors for all the pixels in the square in the middle, which might be significant work if the widget is too big.
I'll take a look and try to optimize some things.
For now I've fixed this by limiting the maximum size of the image I have to render, this will slightly degrade the quality if the widget is very large but it should make it way faster.
When I have more time I'll use OpenMP to use a bit of parallelism.
Awesome! Works perfectly :) Thanks
I get a lot of warnings, when the widget is smaller:
QImage::setPixel: coordinate (0,121) out of range
QImage::setPixel: coordinate (1,121) out of range
QImage::setPixel: coordinate (2,121) out of range
[...]
QImage::setPixel: coordinate (104,121) out of range
They appear only when the triangle is rotating.
Fixed that
I've optimized a bit the number of reallocations for the internal image buffer, so it should be a little bit more efficient now.
Hi, thanks for you work!
I've a small project which displays in its mainwindow just a ColorWheel. When the widget is small everything works fine. But when maximizing the application the wheel gets very unresponsive, especially when using the circle around the triangle.
I'm on Kubuntu 15.04 with Qt 5.4.1.
I've noticed that bug #3 is very similar to this. Since it is closed, I assume that this one is different.