File indexing completed on 2025-01-26 04:11:23
0001 /* 0002 * SPDX-FileCopyrightText: 2013 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef __KIS_CURRENT_OUTLINE_FETCHER_H 0008 #define __KIS_CURRENT_OUTLINE_FETCHER_H 0009 0010 #include <kritapaintop_export.h> 0011 0012 #include <QFlags> 0013 #include <QScopedPointer> 0014 #include <QPainterPath> 0015 #include <QPointF> 0016 0017 #include <kis_paintop_settings.h> 0018 0019 class KisPaintInformation; 0020 class KisOptimizedBrushOutline; 0021 0022 0023 0024 class PAINTOP_EXPORT KisCurrentOutlineFetcher 0025 { 0026 public: 0027 enum Option { 0028 NO_OPTION, 0029 SIZE_OPTION, 0030 ROTATION_OPTION, 0031 MIRROR_OPTION, 0032 SHARPNESS_OPTION 0033 }; 0034 0035 Q_DECLARE_FLAGS(Options, Option); 0036 0037 public: 0038 KisCurrentOutlineFetcher(Options optionsAvailable); 0039 ~KisCurrentOutlineFetcher(); 0040 0041 void setDirty(); 0042 0043 KisOptimizedBrushOutline fetchOutline(const KisPaintInformation &info, 0044 const KisPaintOpSettingsSP settings, 0045 const KisOptimizedBrushOutline &originalOutline, 0046 const KisPaintOpSettings::OutlineMode &mode, 0047 qreal alignForZoom, 0048 qreal additionalScale = 1.0, 0049 qreal additionalRotation = 0.0, 0050 bool tilt = false, qreal tiltcenterx = 1.0, qreal tiltcentery = 1.0) const; 0051 0052 0053 private: 0054 Q_DISABLE_COPY(KisCurrentOutlineFetcher); 0055 struct Private; 0056 const QScopedPointer<Private> d; 0057 }; 0058 0059 Q_DECLARE_OPERATORS_FOR_FLAGS(KisCurrentOutlineFetcher::Options); 0060 0061 #endif /* __KIS_CURRENT_OUTLINE_FETCHER_H */