Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSprayShapeOptionData.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 Agata Cacko <cacko.azh@gmail.com>
3 * SPDX-FileCopyrightText: 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#ifndef KIS_SPRAY_SHAPE_OPTION_DATA_H
8#define KIS_SPRAY_SHAPE_OPTION_DATA_H
9
10
11#include "kis_types.h"
12#include <boost/operators.hpp>
13#include <kritapaintop_export.h>
14
15#include <QImage>
16
18
19struct KisSprayShapeOptionData : boost::equality_comparable<KisSprayShapeOptionData>
20{
21 inline friend bool operator==(const KisSprayShapeOptionData &lhs, const KisSprayShapeOptionData &rhs) {
22 return lhs.shape == rhs.shape
23 && lhs.size == rhs.size
24 && lhs.enabled == rhs.enabled
25 && lhs.proportional == rhs.proportional
26 && lhs.imageUrl == rhs.imageUrl;
27 }
28
29 // particle type size
30 quint8 shape;
31 QSize size;
32 bool enabled;
34
35 // rotation
36 QImage image;
37 QString imageUrl;
38
39 bool read(const KisPropertiesConfiguration *setting);
40 void write(KisPropertiesConfiguration *setting) const;
41
42 QSize effectiveSize(int diameter, qreal scale) const;
43};
44
45#endif // KIS_SPRAY_SHAPE_OPTION_DATA_H
QSize effectiveSize(int diameter, qreal scale) const
void write(KisPropertiesConfiguration *setting) const
bool read(const KisPropertiesConfiguration *setting)
friend bool operator==(const KisSprayShapeOptionData &lhs, const KisSprayShapeOptionData &rhs)