File indexing completed on 2024-06-09 04:28:22
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #ifndef KISTANGENTTILT_OPTION_H 0007 #define KISTANGENTTILT_OPTION_H 0008 0009 #include <brushengine/kis_paint_information.h> 0010 #include "KisTangentTiltOptionData.h" 0011 0012 struct KisTangentTiltOptionData; 0013 0014 class KisTangentTiltOption 0015 { 0016 public: 0017 KisTangentTiltOption(const KisPropertiesConfiguration *setting); 0018 0019 /*This assigns the right axis to the component, based on index and maximum value*/ 0020 void swizzleAssign(qreal const horizontal, qreal const vertical, qreal const depth, qreal *component, int index, qreal maxvalue); 0021 0022 //takes the RGB values and will deform them depending on tilt. 0023 void apply(const KisPaintInformation& info, qreal *r, qreal *g, qreal *b); 0024 0025 private: 0026 KisTangentTiltOption(const KisTangentTiltOptionData &data); 0027 private: 0028 int m_redChannel; 0029 int m_greenChannel; 0030 int m_blueChannel; 0031 TangentTiltDirectionType m_directionType; 0032 double m_elevationSensitivity; 0033 double m_mixValue; 0034 }; 0035 0036 #endif // KISTANGENTILT_OPTION_H