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

0001 /*
0002  *  SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KOVECTORPATTERNBACKGROUND_H
0008 #define KOVECTORPATTERNBACKGROUND_H
0009 
0010 #include <KoShapeBackground.h>
0011 #include <KoFlakeCoordinateSystem.h>
0012 #include <QSharedDataPointer>
0013 
0014 class KoShape;
0015 class QPointF;
0016 class QRectF;
0017 class QTransform;
0018 
0019 
0020 class KoVectorPatternBackground : public KoShapeBackground
0021 {
0022 public:
0023     KoVectorPatternBackground();
0024     ~KoVectorPatternBackground() override;
0025 
0026     bool compareTo(const KoShapeBackground *other) const override;
0027 
0028     void setReferenceCoordinates(KoFlake::CoordinateSystem value);
0029     KoFlake::CoordinateSystem referenceCoordinates() const;
0030 
0031     /**
0032      * In ViewBox just use the same mode as for referenceCoordinates
0033      */
0034     void setContentCoordinates(KoFlake::CoordinateSystem value);
0035     KoFlake::CoordinateSystem contentCoordinates() const;
0036 
0037     void setReferenceRect(const QRectF &value);
0038     QRectF referenceRect() const;
0039 
0040     void setPatternTransform(const QTransform &value);
0041     QTransform patternTransform() const;
0042 
0043     void setShapes(const QList<KoShape*> value);
0044     QList<KoShape*> shapes() const;
0045 
0046     void paint(QPainter &painter, const QPainterPath &fillPath) const override;
0047     bool hasTransparency() const override;
0048 private:
0049     class Private;
0050     QSharedDataPointer<Private> d;
0051 };
0052 
0053 #endif // KOVECTORPATTERNBACKGROUND_H