File indexing completed on 2024-05-12 15:56:39

0001 /*
0002  *  SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KOCLIPMASK_H
0008 #define KOCLIPMASK_H
0009 
0010 #include "kritaflake_export.h"
0011 
0012 #include <KoFlakeCoordinateSystem.h>
0013 #include <QList>
0014 #include <QSharedDataPointer>
0015 
0016 class KoShape;
0017 class QRectF;
0018 class QTransform;
0019 class QPointF;
0020 class QPainter;
0021 
0022 
0023 class KRITAFLAKE_EXPORT KoClipMask
0024 {
0025 public:
0026     KoClipMask();
0027     ~KoClipMask();
0028 
0029     // Work around MSVC inability to generate copy ops with QSharedDataPointer.
0030     KoClipMask(const KoClipMask &);
0031     KoClipMask &operator=(const KoClipMask &);
0032 
0033     KoClipMask *clone() const;
0034 
0035     KoFlake::CoordinateSystem coordinates() const;
0036     void setCoordinates(KoFlake::CoordinateSystem value);
0037 
0038     KoFlake::CoordinateSystem contentCoordinates() const;
0039     void setContentCoordinates(KoFlake::CoordinateSystem value);
0040 
0041     QRectF maskRect() const;
0042     void setMaskRect(const QRectF &value);
0043 
0044     QList<KoShape *> shapes() const;
0045     void setShapes(const QList<KoShape *> &value);
0046 
0047     bool isEmpty() const;
0048 
0049     void setExtraShapeOffset(const QPointF &value);
0050 
0051     void drawMask(QPainter *painter, KoShape *shape);
0052 
0053 private:
0054     struct Private;
0055     QSharedDataPointer<Private> m_d;
0056 };
0057 
0058 #endif // KOCLIPMASK_H