6#ifndef KIS_VISUAL_COLOR_SELECTOR_SHAPE_H
7#define KIS_VISUAL_COLOR_SELECTOR_SHAPE_H
10#include <QScopedPointer>
44 int channel1,
int channel2);
115 int channel(
int dimension)
const;
153 QImage
convertImageMap(
const quint8 *rawColor, quint32 bufferSize, QSize imgSize)
const;
163 virtual QImage
renderBackground(
const QVector4D &channelValues,
const QImage &alpha)
const;
185 const QScopedPointer<Private>
m_d;
The KisVisualColorModel class allows manipulating a KoColor using various color models.
The KisVisualColorSelectorShape class A 2d widget can represent at maximum 2 coordinates....
KisVisualColorModel * selectorModel() const
void setCursorPosition(QPointF position, bool signal=false)
setCursorPosition Set the cursor to normalized shape coordinates. This will only repaint the cursor.
void setChannelValues(QVector4D channelValues, quint32 channelFlags)
setChannelValues Set the current channel values; Note that channel values controlled by the shape its...
void mouseReleaseEvent(QMouseEvent *e) override
KisVisualColorSelector * colorSelector() const
virtual bool supportsGamutMask() const
void mouseMoveEvent(QMouseEvent *e) override
void forceImageUpdate()
forceImageUpdate force the image to recache.
virtual QPointF convertWidgetCoordinateToShapeCoordinate(QPointF coordinate) const =0
convertWidgetCoordinateToShapeCoordinate Convert a coordinate in the widget's height/width to a shape...
QPointF getCursorPosition() const
getCursorPosition
virtual void drawCursor(QPainter &painter)=0
int channel(int dimension) const
channel Get the channel index associated with a selector shape dimension
virtual QImage renderStaticAlphaMask() const
virtual QImage renderBackground(const QVector4D &channelValues, const QImage &alpha) const
renderBackground Render the widget background visible inside the widget's mask in current color space...
virtual QRect getSpaceForTriangle(QRect geom)=0
virtual QImage compositeBackground() const
virtual QImage renderAlphaMask() const
render the alpha mask for the widget background the returned image is expected to be QImage::Format_A...
virtual QRect getSpaceForCircle(QRect geom)=0
quint32 channelMask() const
void mousePressEvent(QMouseEvent *e) override
void setAcceptTabletEvents(bool on)
~KisVisualColorSelectorShape() override
virtual void updateGamutMask()
Notify shape that the gamut mask changed.
QColor getColorFromConverter(KoColor c)
getColorFromConverter
virtual void drawGamutMask(QPainter &painter)
void tabletEvent(QTabletEvent *event) override
virtual QRegion getMaskMap()=0
getPixmap
KoColor getCurrentColor()
getCurrentColor
void sigCursorMoved(QPointF pos)
const QScopedPointer< Private > m_d
bool isHueControl() const
void paintEvent(QPaintEvent *) override
virtual void setBorderWidth(int width)=0
setBorderWidth set the border of the single dimensional selector.
KisVisualColorSelectorShape(KisVisualColorSelector *parent, KisVisualColorSelectorShape::Dimensions dimension, int channel1, int channel2)
Dimensions getDimensions() const
getDimensions
virtual QPointF mousePositionToShapeCoordinate(const QPointF &pos, const QPointF &dragStart) const
default implementation just calls convertWidgetCoordinateToShapeCoordinate(pos)
QImage convertImageMap(const quint8 *rawColor, quint32 bufferSize, QSize imgSize) const
convertImageMap convert image data containing raw KoColor data into a QImage
Dimensions
The Dimensions enum Whether or not the shape is single or two dimensional.
const QImage & getImageMap()
getImageMap returns the updated base image
void resizeEvent(QResizeEvent *) override
virtual QPointF convertShapeCoordinateToWidgetCoordinate(QPointF) const =0
convertShapeCoordinateToWidgetCoordinate
virtual QRect getSpaceForSquare(QRect geom)=0
getSpaceForSquare
The KisVisualColorSelector class.