File indexing completed on 2024-05-12 15:58:52

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KISRENDEREDDAB_H
0008 #define KISRENDEREDDAB_H
0009 
0010 #include "kis_types.h"
0011 #include "kis_fixed_paint_device.h"
0012 
0013 struct KisRenderedDab
0014 {
0015     KisRenderedDab() {}
0016     KisRenderedDab(KisFixedPaintDeviceSP _device)
0017         : device(_device),
0018           offset(_device->bounds().topLeft())
0019     {
0020     }
0021 
0022     KisRenderedDab(const KisRenderedDab &/*rhs*/) = default;
0023 
0024     KisFixedPaintDeviceSP device;
0025     QPoint offset;
0026 
0027     qreal opacity = OPACITY_OPAQUE_F;
0028     qreal flow = OPACITY_OPAQUE_F;
0029     qreal averageOpacity = OPACITY_TRANSPARENT_F;
0030 
0031     inline QRect realBounds() const {
0032         return QRect(offset, device->bounds().size());
0033     }
0034 };
0035 
0036 #endif // KISRENDEREDDAB_H