Krita Source Code Documentation
Loading...
Searching...
No Matches
DeformRotation Class Reference

Inverse weighted rotation - swirlCW&&swirlCWW. More...

#include <deform_brush.h>

+ Inheritance diagram for DeformRotation:

Public Member Functions

void setAlpha (qreal alpha)
 
void transform (qreal *maskX, qreal *maskY, qreal distance, KisRandomSourceSP randomSource) override
 
- Public Member Functions inherited from DeformBase
 DeformBase ()
 
virtual ~DeformBase ()
 

Private Attributes

qreal m_alpha {0.0}
 

Detailed Description

Inverse weighted rotation - swirlCW&&swirlCWW.

Definition at line 64 of file deform_brush.h.

Member Function Documentation

◆ setAlpha()

void DeformRotation::setAlpha ( qreal alpha)
inline

Definition at line 68 of file deform_brush.h.

68 {
69 m_alpha = alpha;
70 }

References m_alpha.

◆ transform()

void DeformRotation::transform ( qreal * maskX,
qreal * maskY,
qreal distance,
KisRandomSourceSP randomSource )
inlineoverridevirtual

Reimplemented from DeformBase.

Definition at line 71 of file deform_brush.h.

71 {
72 Q_UNUSED(randomSource);
73 distance = 1.0 - distance;
74 qreal rotX = cos(-m_alpha * distance) * (*maskX) - sin(-m_alpha * distance) * (*maskY);
75 qreal rotY = sin(-m_alpha * distance) * (*maskX) + cos(-m_alpha * distance) * (*maskY);
76
77 *maskX = rotX;
78 *maskY = rotY;
79 }
qreal distance(const QPointF &p1, const QPointF &p2)

References distance(), and m_alpha.

Member Data Documentation

◆ m_alpha

qreal DeformRotation::m_alpha {0.0}
private

Definition at line 82 of file deform_brush.h.

82{0.0};

The documentation for this class was generated from the following file: