Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_mask_projection_plane.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
8
9#include <KoColorSpace.h>
10#include <KoChannelInfo.h>
11#include "kis_painter.h"
12#include "kis_mask.h"
13
14
19
20
22 : m_d(new Private)
23{
24 m_d->mask = mask;
25}
26
30
31QRect KisMaskProjectionPlane::recalculate(const QRect& rect, KisNodeSP filthyNode, KisRenderPassFlags flags)
32{
33 Q_UNUSED(filthyNode);
34 Q_UNUSED(flags);
35
36 KIS_ASSERT_RECOVER_NOOP(0 && "KisMaskProjectionPlane::recalculate() is not defined!");
37
38 return rect;
39}
40
41void KisMaskProjectionPlane::apply(KisPainter *painter, const QRect &rect)
42{
43 Q_UNUSED(painter);
44 Q_UNUSED(rect);
45
46 KIS_ASSERT_RECOVER_NOOP(0 && "KisMaskProjectionPlane::apply() is not defined!");
47}
48
50{
51 // masks have no projection
52 return KisPaintDeviceList();
53}
54
56{
57 return m_d->mask->needRect(rect, pos);
58}
59
61{
62 return m_d->mask->changeRect(rect, pos);
63}
64
66{
67 return m_d->mask->accessRect(rect, pos);
68}
69
71{
72 return rect;
73}
74
76{
77 // masks don't have any internal rendering subtrees,
78 // so just return the exact bounds of the mask
79 return m_d->mask->exactBounds();
80}
81
83{
84 // masks don't have anything complex inside, so just
85 // so just return the extent of the mask
86 return m_d->mask->extent();
87}
88
QRect recalculate(const QRect &rect, KisNodeSP filthyNode, KisRenderPassFlags flags) override
QRect looseUserVisibleBounds() const override
const QScopedPointer< Private > m_d
void apply(KisPainter *painter, const QRect &rect) override
QRect needRect(const QRect &rect, KisNode::PositionToFilthy pos) const override
QRect accessRect(const QRect &rect, KisNode::PositionToFilthy pos) const override
QRect needRectForOriginal(const QRect &rect) const override
KisPaintDeviceList getLodCapableDevices() const override
QRect changeRect(const QRect &rect, KisNode::PositionToFilthy pos) const override
QRect tightUserVisibleBounds() const override
#define KIS_ASSERT_RECOVER_NOOP(cond)
Definition kis_assert.h:97
QList< KisPaintDeviceSP > KisPaintDeviceList
Definition kis_types.h:267
PositionToFilthy
Definition kis_node.h:58