Krita Source Code Documentation
Loading...
Searching...
No Matches
hatching_brush.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2008, 2009 Lukáš Tvrdý <lukast.dev@gmail.com>
3
* SPDX-FileCopyrightText: 2010 José Luis Vergara <pentalis@gmail.com>
4
*
5
* SPDX-License-Identifier: GPL-2.0-or-later
6
*/
7
8
#ifndef HATCHING_BRUSH_H_
9
#define HATCHING_BRUSH_H_
10
11
#include <
KoColor.h
>
12
13
#include "
kis_hatching_paintop_settings.h
"
14
15
#include <
kis_painter.h
>
16
#include <
kis_paint_device.h
>
17
#include <
brushengine/kis_paint_information.h
>
18
19
20
class
HatchingBrush
21
{
22
23
public
:
24
HatchingBrush
(
KisHatchingPaintOpSettingsSP
settings);
25
~HatchingBrush
();
26
HatchingBrush
(
KoColor
inkColor);
27
31
void
hatch
(
KisPaintDeviceSP
dev, qreal x, qreal y,
double
width,
double
height,
double
givenAngle,
const
KoColor
&color, qreal additionalScale);
32
33
34
private
:
35
void
init
();
36
KoColor
m_inkColor
;
37
int
m_counter
{0};
38
int
m_radius
{0};
39
KisHatchingPaintOpSettingsSP
m_settings
;
40
KisPainter
m_painter
;
41
43
int
thickness
{0};
44
46
double
angle
{0.0};
47
49
double
separation
{0.0};
50
52
double
height_
{0.0};
53
55
double
width_
{0.0};
56
58
double
origin_x
{0.0};
59
61
double
origin_y
{0.0};
62
64
double
baseLineIntercept
{0};
65
70
double
hotIntercept
{0};
71
73
double
scanIntercept
{0};
74
79
double
verticalHotX
{0.0};
80
82
double
verticalScanX
{0.0};
83
85
double
slope
{0};
86
88
double
dx
{0};
89
91
double
dy
{0};
92
96
double
cursorLineIntercept
{0};
97
102
void
iterateLines
(
bool
forward,
int
lineindex,
bool
oneline);
103
110
void
iterateVerticalLines
(
bool
forward,
int
lineindex,
bool
oneline);
111
118
double
separationAsFunctionOfParameter
(
double
parameter,
double
separation
,
int
numintervals);
119
};
120
121
#endif
KoColor.h
HatchingBrush
Definition
hatching_brush.h:21
HatchingBrush::baseLineIntercept
double baseLineIntercept
Definition
hatching_brush.h:64
HatchingBrush::origin_y
double origin_y
Definition
hatching_brush.h:61
HatchingBrush::HatchingBrush
HatchingBrush(KisHatchingPaintOpSettingsSP settings)
Definition
hatching_brush.cpp:25
HatchingBrush::iterateLines
void iterateLines(bool forward, int lineindex, bool oneline)
Definition
hatching_brush.cpp:93
HatchingBrush::angle
double angle
Definition
hatching_brush.h:46
HatchingBrush::m_radius
int m_radius
Definition
hatching_brush.h:38
HatchingBrush::slope
double slope
Definition
hatching_brush.h:85
HatchingBrush::m_settings
KisHatchingPaintOpSettingsSP m_settings
Definition
hatching_brush.h:39
HatchingBrush::iterateVerticalLines
void iterateVerticalLines(bool forward, int lineindex, bool oneline)
Definition
hatching_brush.cpp:192
HatchingBrush::verticalHotX
double verticalHotX
Definition
hatching_brush.h:79
HatchingBrush::height_
double height_
Definition
hatching_brush.h:52
HatchingBrush::origin_x
double origin_x
Definition
hatching_brush.h:58
HatchingBrush::cursorLineIntercept
double cursorLineIntercept
Definition
hatching_brush.h:96
HatchingBrush::dy
double dy
Definition
hatching_brush.h:91
HatchingBrush::verticalScanX
double verticalScanX
Definition
hatching_brush.h:82
HatchingBrush::thickness
int thickness
Definition
hatching_brush.h:43
HatchingBrush::m_painter
KisPainter m_painter
Definition
hatching_brush.h:40
HatchingBrush::m_counter
int m_counter
Definition
hatching_brush.h:37
HatchingBrush::width_
double width_
Definition
hatching_brush.h:55
HatchingBrush::HatchingBrush
HatchingBrush(KoColor inkColor)
HatchingBrush::hatch
void hatch(KisPaintDeviceSP dev, qreal x, qreal y, double width, double height, double givenAngle, const KoColor &color, qreal additionalScale)
Definition
hatching_brush.cpp:42
HatchingBrush::m_inkColor
KoColor m_inkColor
Definition
hatching_brush.h:36
HatchingBrush::separationAsFunctionOfParameter
double separationAsFunctionOfParameter(double parameter, double separation, int numintervals)
Definition
hatching_brush.cpp:246
HatchingBrush::scanIntercept
double scanIntercept
Definition
hatching_brush.h:73
HatchingBrush::dx
double dx
Definition
hatching_brush.h:88
HatchingBrush::hotIntercept
double hotIntercept
Definition
hatching_brush.h:70
HatchingBrush::init
void init()
Definition
hatching_brush.cpp:38
HatchingBrush::~HatchingBrush
~HatchingBrush()
Definition
hatching_brush.cpp:34
HatchingBrush::separation
double separation
Definition
hatching_brush.h:49
KisPainter
Definition
kis_painter.h:66
KisSharedPtr< KisHatchingPaintOpSettings >
KoColor
Definition
KoColor.h:31
kis_hatching_paintop_settings.h
kis_paint_device.h
kis_paint_information.h
kis_painter.h
plugins
paintops
hatching
hatching_brush.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52