Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_pipebrush_parasite.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2004 Boudewijn Rempt <boud@valdyas.org>
3 * SPDX-FileCopyrightText: 2005 Bart Coppens <kde@bartcoppens.be>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#ifndef KIS_IMAGE_PIPE_BRUSH_P_H
8#define KIS_IMAGE_PIPE_BRUSH_P_H
9
10#include "kis_imagepipe_brush.h"
11#include <math.h>
12#include <limits.h>
13
14#include <QFile>
15#include <QPoint>
16
17#include <kis_debug.h>
18#include <klocalizedstring.h>
19#include <krandom.h>
20
21#include "kis_global.h"
22#include "kis_paint_device.h"
23#include "kis_layer.h"
24
25#include "kritabrush_export.h"
26
48class BRUSH_EXPORT KisPipeBrushParasite
49{
50public:
53 : ncells(0)
54 , dim(0)
55 , needsMovement(false) {
56 init();
57 }
58
59 void init();
60 void sanitize();
61
63 void setBrushesCount();
64
66 KisPipeBrushParasite(QStringView source);
67
71 bool saveToDevice(QIODevice* dev) const;
72 bool loadFromDevice(QIODevice *dev);
73
74 enum Placement { DefaultPlacement, ConstantPlacement, RandomPlacement };
75
76 static int const MaxDim = 4;
77
78 //qint32 step;
79 qint32 ncells {0};
80 qint32 dim {0};
81
82 // Apparently only used for editing a pipe brush, which we won't at the moment
83 // qint32 cols, rows;
84 // qint32 cellwidth, cellheight;
85 // Apparently the gimp doesn't use this anymore? Anyway it is a bit weird to
86 // paint at someplace else than where your cursor displays it will...
87 //Placement placement;
88 qint32 rank[MaxDim] {};
89
90 KisParasite::SelectionMode selection[MaxDim];
91 QString selectionMode; // for UI
92
94 qint32 brushesCount[MaxDim];
95
97 qint32 index[MaxDim];
98
100 bool needsMovement {false};
101};
102#endif
KisMagneticGraph::vertex_descriptor source(typename KisMagneticGraph::edge_descriptor e, KisMagneticGraph g)
KisPipeBrushParasite()
Set some default values.
bool loadFromDevice(QIODevice *dev)