|
Krita Source Code Documentation
|
#include <KisVisualEllipticalSelectorShape.h>
Inheritance diagram for KisVisualEllipticalSelectorShape:Public Types | |
| enum | singelDTypes { border , borderMirrored } |
Public Types inherited from KisVisualColorSelectorShape | |
| enum | Dimensions { onedimensional , twodimensional } |
| The Dimensions enum Whether or not the shape is single or two dimensional. More... | |
Public Member Functions | |
| QRect | getSpaceForCircle (QRect geom) override |
| QRect | getSpaceForSquare (QRect geom) override |
| getSpaceForSquare | |
| QRect | getSpaceForTriangle (QRect geom) override |
| KisVisualEllipticalSelectorShape (KisVisualColorSelector *parent, Dimensions dimension, int channel1, int channel2, int barWidth=20, KisVisualEllipticalSelectorShape::singelDTypes d=KisVisualEllipticalSelectorShape::border) | |
| void | setBorderWidth (int width) override |
| setBorderWidth set the border of the single dimensional selector. | |
| bool | supportsGamutMask () const override |
| void | updateGamutMask () override |
| Notify shape that the gamut mask changed. | |
| ~KisVisualEllipticalSelectorShape () override | |
Public Member Functions inherited from KisVisualColorSelectorShape | |
| int | channel (int dimension) const |
| channel Get the channel index associated with a selector shape dimension | |
| quint32 | channelMask () const |
| void | forceImageUpdate () |
| forceImageUpdate force the image to recache. | |
| QColor | getColorFromConverter (KoColor c) |
| getColorFromConverter | |
| KoColor | getCurrentColor () |
| getCurrentColor | |
| QPointF | getCursorPosition () const |
| getCursorPosition | |
| Dimensions | getDimensions () const |
| getDimensions | |
| const QImage & | getImageMap () |
| getImageMap returns the updated base image | |
| bool | isHueControl () const |
| KisVisualColorSelectorShape (KisVisualColorSelector *parent, KisVisualColorSelectorShape::Dimensions dimension, int channel1, int channel2) | |
| void | setAcceptTabletEvents (bool on) |
| void | setChannelValues (QVector4D channelValues, quint32 channelFlags) |
| setChannelValues Set the current channel values; Note that channel values controlled by the shape itself have no effect unless setCursor is true. This will trigger a full widget repaint. | |
| void | setCursorPosition (QPointF position, bool signal=false) |
| setCursorPosition Set the cursor to normalized shape coordinates. This will only repaint the cursor. | |
| ~KisVisualColorSelectorShape () override | |
Protected Member Functions | |
| QPointF | mousePositionToShapeCoordinate (const QPointF &pos, const QPointF &dragStart) const override |
| default implementation just calls convertWidgetCoordinateToShapeCoordinate(pos) | |
| QImage | renderAlphaMask () const override |
| render the alpha mask for the widget background the returned image is expected to be QImage::Format_Alpha8 | |
| void | renderGamutMask () |
| QImage | renderStaticAlphaMask () const override |
Protected Member Functions inherited from KisVisualColorSelectorShape | |
| KisVisualColorSelector * | colorSelector () const |
| virtual QImage | compositeBackground () const |
| QImage | convertImageMap (const quint8 *rawColor, quint32 bufferSize, QSize imgSize) const |
| convertImageMap convert image data containing raw KoColor data into a QImage | |
| void | mouseMoveEvent (QMouseEvent *e) override |
| void | mousePressEvent (QMouseEvent *e) override |
| void | mouseReleaseEvent (QMouseEvent *e) override |
| void | paintEvent (QPaintEvent *) override |
| 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 Rendering shall be done with the conversion functions of KisVisualColorSelector | |
| void | resizeEvent (QResizeEvent *) override |
| KisVisualColorModel * | selectorModel () const |
| void | tabletEvent (QTabletEvent *event) override |
Private Member Functions | |
| QPointF | convertShapeCoordinateToWidgetCoordinate (QPointF coordinate) const override |
| convertShapeCoordinateToWidgetCoordinate | |
| QPointF | convertWidgetCoordinateToShapeCoordinate (QPointF coordinate) const override |
| convertWidgetCoordinateToShapeCoordinate Convert a coordinate in the widget's height/width to a shape coordinate. | |
| void | drawCursor (QPainter &painter) override |
| void | drawGamutMask (QPainter &painter) override |
| QRegion | getMaskMap () override |
| getPixmap | |
| QImage | renderAlphaMaskImpl (qreal outerBorder, qreal innerBorder) const |
Private Attributes | |
| int | m_barWidth |
| QImage | m_gamutMaskImage |
| bool | m_gamutMaskNeedsUpdate |
| QTransform | m_gamutMaskTransform |
| singelDTypes | m_type |
Additional Inherited Members | |
Signals inherited from KisVisualColorSelectorShape | |
| void | sigCursorMoved (QPointF pos) |
Definition at line 13 of file KisVisualEllipticalSelectorShape.h.
| Enumerator | |
|---|---|
| border | |
| borderMirrored | |
Definition at line 17 of file KisVisualEllipticalSelectorShape.h.
|
explicit |
Definition at line 21 of file KisVisualEllipticalSelectorShape.cpp.
References m_barWidth, m_gamutMaskNeedsUpdate, m_type, and KisVisualColorSelectorShape::twodimensional.
|
override |
Definition at line 34 of file KisVisualEllipticalSelectorShape.cpp.
|
overrideprivatevirtual |
convertShapeCoordinateToWidgetCoordinate
Implements KisVisualColorSelectorShape.
Definition at line 109 of file KisVisualEllipticalSelectorShape.cpp.
References borderMirrored, KisVisualColorSelectorShape::getDimensions(), m_barWidth, m_type, and KisVisualColorSelectorShape::onedimensional.
|
overrideprivatevirtual |
convertWidgetCoordinateToShapeCoordinate Convert a coordinate in the widget's height/width to a shape coordinate.
| coordinate | the position your wish to have the shape coordinates of. |
Implements KisVisualColorSelectorShape.
Definition at line 128 of file KisVisualEllipticalSelectorShape.cpp.
References borderMirrored, KisVisualColorSelectorShape::getDimensions(), kisRadiansToDegrees(), m_type, and KisVisualColorSelectorShape::twodimensional.
|
overrideprivatevirtual |
Implements KisVisualColorSelectorShape.
Definition at line 296 of file KisVisualEllipticalSelectorShape.cpp.
References borderMirrored, convertShapeCoordinateToWidgetCoordinate(), KisVisualColorSelectorShape::getColorFromConverter(), KisVisualColorSelectorShape::getCurrentColor(), KisVisualColorSelectorShape::getCursorPosition(), and m_type.
|
overrideprivatevirtual |
Reimplemented from KisVisualColorSelectorShape.
Definition at line 330 of file KisVisualEllipticalSelectorShape.cpp.
References m_gamutMaskImage, m_gamutMaskNeedsUpdate, and renderGamutMask().
|
overrideprivatevirtual |
getPixmap
Implements KisVisualColorSelectorShape.
Definition at line 190 of file KisVisualEllipticalSelectorShape.cpp.
References KisVisualColorSelectorShape::getDimensions(), m_barWidth, and KisVisualColorSelectorShape::onedimensional.
|
overridevirtual |
Implements KisVisualColorSelectorShape.
Definition at line 62 of file KisVisualEllipticalSelectorShape.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, and m_barWidth.
|
overridevirtual |
getSpaceForSquare
| geom | the full widget rectangle |
Implements KisVisualColorSelectorShape.
Definition at line 46 of file KisVisualEllipticalSelectorShape.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, and m_barWidth.
|
overridevirtual |
Implements KisVisualColorSelectorShape.
Definition at line 74 of file KisVisualEllipticalSelectorShape.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, and m_barWidth.
|
overrideprotectedvirtual |
default implementation just calls convertWidgetCoordinateToShapeCoordinate(pos)
Reimplemented from KisVisualColorSelectorShape.
Definition at line 165 of file KisVisualEllipticalSelectorShape.cpp.
References KisVisualColorSelector::activeGamutMask(), borderMirrored, KisVisualColorSelectorShape::colorSelector(), convertWidgetCoordinateToShapeCoordinate(), KoGamutMask::coordIsClear(), KisVisualColorSelectorShape::getCursorPosition(), KisVisualColorSelectorShape::getDimensions(), m_gamutMaskTransform, m_type, and KisVisualColorSelectorShape::twodimensional.
|
overrideprotectedvirtual |
render the alpha mask for the widget background the returned image is expected to be QImage::Format_Alpha8
Reimplemented from KisVisualColorSelectorShape.
Definition at line 225 of file KisVisualEllipticalSelectorShape.cpp.
References KisVisualColorSelectorShape::colorSelector(), KisVisualColorSelector::CompositeBackground, KisVisualColorSelectorShape::getDimensions(), KisVisualColorSelectorShape::isHueControl(), KVESS_MARGIN, m_barWidth, KisVisualColorSelectorShape::onedimensional, renderAlphaMaskImpl(), KisVisualColorSelector::renderMode(), and KisVisualColorSelector::StaticBackground.
|
private |
Definition at line 199 of file KisVisualEllipticalSelectorShape.cpp.
|
protected |
Definition at line 255 of file KisVisualEllipticalSelectorShape.cpp.
References KisVisualColorSelector::activeGamutMask(), KisVisualColorSelectorShape::colorSelector(), KVESS_MARGIN, m_gamutMaskImage, m_gamutMaskNeedsUpdate, KoGamutMask::maskToViewTransform(), KoGamutMask::paint(), and KoGamutMask::paintStroke().
|
overrideprotectedvirtual |
Reimplemented from KisVisualColorSelectorShape.
Definition at line 242 of file KisVisualEllipticalSelectorShape.cpp.
References KisVisualColorSelectorShape::colorSelector(), KisVisualColorSelector::CompositeBackground, KisVisualColorSelector::DynamicBackground, KisVisualColorSelectorShape::isHueControl(), KVESS_MARGIN, m_barWidth, renderAlphaMaskImpl(), and KisVisualColorSelector::renderMode().
|
overridevirtual |
setBorderWidth set the border of the single dimensional selector.
| width |
Implements KisVisualColorSelectorShape.
Definition at line 39 of file KisVisualEllipticalSelectorShape.cpp.
References KisVisualColorSelectorShape::forceImageUpdate(), and m_barWidth.
|
overridevirtual |
Reimplemented from KisVisualColorSelectorShape.
Definition at line 91 of file KisVisualEllipticalSelectorShape.cpp.
References KisVisualColorSelectorShape::getDimensions(), and KisVisualColorSelectorShape::twodimensional.
|
overridevirtual |
Notify shape that the gamut mask changed.
The gamut mask shall be updated and the widget repainted if necessary. This includes removal of gamut masks
Reimplemented from KisVisualColorSelectorShape.
Definition at line 96 of file KisVisualEllipticalSelectorShape.cpp.
References KisVisualColorSelector::activeGamutMask(), KisVisualColorSelectorShape::colorSelector(), KVESS_MARGIN, m_gamutMaskNeedsUpdate, m_gamutMaskTransform, supportsGamutMask(), and KoGamutMask::viewToMaskTransform().
|
private |
Definition at line 54 of file KisVisualEllipticalSelectorShape.h.
|
private |
Definition at line 55 of file KisVisualEllipticalSelectorShape.h.
|
private |
Definition at line 57 of file KisVisualEllipticalSelectorShape.h.
|
private |
Definition at line 56 of file KisVisualEllipticalSelectorShape.h.
|
private |
Definition at line 53 of file KisVisualEllipticalSelectorShape.h.