Krita Source Code Documentation
Loading...
Searching...
No Matches
KisGradientWidgetsUtils.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 Deif Lou <ginoba@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KIS_GRADIENT_WIDGETS_UTIL_H
8#define KIS_GRADIENT_WIDGETS_UTIL_H
9
10#include <QPainter>
11#include <QRectF>
12#include <QPointF>
13#include <QSizeF>
14#include <QColor>
15
16#include <KoAbstractGradient.h>
17#include <KoSegmentGradient.h>
18#include <kritaui_export.h>
19
21{
22
27
29{
31 QColor color;
32};
33
34void KRITAUI_EXPORT paintGradientBox(QPainter &painter, const KoAbstractGradientSP gradient, const QRectF &rect);
35void KRITAUI_EXPORT paintStopHandle(QPainter &painter,
36 const QPointF &position,
37 const QSizeF &size,
38 bool isSelected, bool isHovered, bool hasFocus,
39 const QColor &highlightColor,
40 const StopHandleColor &color1,
41 const StopHandleColor &color2 = {});
42void KRITAUI_EXPORT paintMidPointHandle(QPainter &painter,
43 const QPointF &position,
44 qreal size,
45 bool isSelected, bool isHovered, bool hasFocus,
46 const QColor &borderColor,
47 const QColor &fillColor,
48 const QColor &highlightColor);
49
52
53}
54
55#endif
KoGradientSegmentEndpointType
void paintGradientBox(QPainter &painter, const KoAbstractGradientSP gradient, const QRectF &rect)
void paintStopHandle(QPainter &painter, const QPointF &position, const QSizeF &size, bool isSelected, bool isHovered, bool hasFocus, const QColor &highlightColor, const StopHandleColor &color1, const StopHandleColor &color2)
KisGradientWidgetsUtils::ColorType segmentEndPointTypeToColorType(KoGradientSegmentEndpointType type)
KoGradientSegmentEndpointType colorTypeToSegmentEndPointType(KisGradientWidgetsUtils::ColorType type, bool transparent)
void paintMidPointHandle(QPainter &painter, const QPointF &position, qreal size, bool isSelected, bool isHovered, bool hasFocus, const QColor &borderColor, const QColor &fillColor, const QColor &highlightColor)