The ClickableImageLabel class Displays an image scaled to fit a reasonable dialog size, but always samples the picked color from the original, full-resolution image at the corresponding coordinate – never from the (possibly smoothly interpolated, and therefore color-blended) scaled-down pixmap being displayed, which would make the picked color subtly wrong for exactly the pixels near an edge where it matters most.
More...
#include <imagetransparentcolordialog.h>
Inherits QLabel.
The ClickableImageLabel class Displays an image scaled to fit a reasonable dialog size, but always samples the picked color from the original, full-resolution image at the corresponding coordinate – never from the (possibly smoothly interpolated, and therefore color-blended) scaled-down pixmap being displayed, which would make the picked color subtly wrong for exactly the pixels near an edge where it matters most.
◆ ClickableImageLabel()
| ClickableImageLabel::ClickableImageLabel |
( |
const QImage & | sourceImage, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
◆ colorPicked
| void ClickableImageLabel::colorPicked |
( |
const QColor & | color | ) |
|
|
signal |
◆ displayImage()
| QImage ClickableImageLabel::displayImage |
( |
| ) |
const |
|
inline |
The same downsampled image already computed for display – reused as the live-preview source so a tolerance drag runs its per-tick colour-key pass against a small image instead of the full-resolution one, which on a large source (a scanned schematic background, several Mpx) made every intermediate slider tick visibly lag. resultPixmap() still computes the final, committed result from the true full-resolution source – only the live preview is downsampled.
◆ mousePressEvent()
| void ClickableImageLabel::mousePressEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotected |
◆ m_displayImage
| QImage ClickableImageLabel::m_displayImage |
|
private |
◆ m_displayScale
| qreal ClickableImageLabel::m_displayScale = 1.0 |
|
private |
◆ m_source
| QImage ClickableImageLabel::m_source |
|
private |
The documentation for this class was generated from the following files: