File indexing completed on 2024-06-16 04:17:31
0001 /* 0002 * SPDX-FileCopyrightText: 2022 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #ifndef KISSHARPNESSOPTION_H 0007 #define KISSHARPNESSOPTION_H 0008 0009 #include <KisCurveOption.h> 0010 0011 struct KisSharpnessOptionData; 0012 0013 class PAINTOP_EXPORT KisSharpnessOption : public KisCurveOption 0014 { 0015 public: 0016 KisSharpnessOption(const KisPropertiesConfiguration *setting); 0017 0018 /** 0019 * First part of the sharpness is the coordinates: in pen mode they are integers without fractions 0020 */ 0021 void apply(const KisPaintInformation &info, const QPointF &pt, qint32 &x, qint32 &y, qreal &xFraction, qreal &yFraction) const; 0022 0023 /** 0024 * Apply threshold specified by user 0025 */ 0026 void applyThreshold(KisFixedPaintDeviceSP dab, const KisPaintInformation &info); 0027 0028 bool alignOutlineToPixels() const; 0029 0030 private: 0031 KisSharpnessOption(const KisSharpnessOptionData &data); 0032 private: 0033 bool m_alignOutlinePixels; 0034 int m_softness; 0035 }; 0036 0037 #endif // KISSHARPNESSOPTION_H