25 #ifndef JUCE_AFFINETRANSFORM_H_INCLUDED
26 #define JUCE_AFFINETRANSFORM_H_INCLUDED
59 float mat10,
float mat11,
float mat12)
noexcept;
82 template <
typename ValueType>
85 const ValueType oldX = x;
86 x =
static_cast<ValueType
> (mat00 * oldX + mat01 * y + mat02);
87 y =
static_cast<ValueType
> (mat10 * oldX + mat11 * y + mat12);
95 template <
typename ValueType>
97 ValueType& x2, ValueType& y2)
const noexcept
99 const ValueType oldX1 = x1, oldX2 = x2;
100 x1 =
static_cast<ValueType
> (mat00 * oldX1 + mat01 * y1 + mat02);
101 y1 =
static_cast<ValueType
> (mat10 * oldX1 + mat11 * y1 + mat12);
102 x2 =
static_cast<ValueType
> (mat00 * oldX2 + mat01 * y2 + mat02);
103 y2 =
static_cast<ValueType
> (mat10 * oldX2 + mat11 * y2 + mat12);
111 template <
typename ValueType>
113 ValueType& x2, ValueType& y2,
114 ValueType& x3, ValueType& y3)
const noexcept
116 const ValueType oldX1 = x1, oldX2 = x2, oldX3 = x3;
117 x1 =
static_cast<ValueType
> (mat00 * oldX1 + mat01 * y1 + mat02);
118 y1 =
static_cast<ValueType
> (mat10 * oldX1 + mat11 * y1 + mat12);
119 x2 =
static_cast<ValueType
> (mat00 * oldX2 + mat01 * y2 + mat02);
120 y2 =
static_cast<ValueType
> (mat10 * oldX2 + mat11 * y2 + mat12);
121 x3 =
static_cast<ValueType
> (mat00 * oldX3 + mat01 * y3 + mat02);
122 y3 =
static_cast<ValueType
> (mat10 * oldX3 + mat11 * y3 + mat12);
131 template <
typename Po
intType>
134 return translated ((
float) delta.x, (
float) delta.y);
142 template <
typename Po
intType>
145 return translation ((
float) delta.x, (
float) delta.y);
191 float pivotX,
float pivotY)
const noexcept;
202 float pivotX,
float pivotY)
noexcept;
231 float x10,
float y10,
235 static
AffineTransform fromTargetPoints (
float sourceX1,
float sourceY1,
float targetX1,
float targetY1,
236 float sourceX2,
float sourceY2,
float targetX2,
float targetY2,
237 float sourceX3,
float sourceY3,
float targetX3,
float targetY3) noexcept;
244 bool isIdentity()
const noexcept;
247 bool isSingularity()
const noexcept;
251 bool isOnlyTranslation()
const noexcept;
256 float getTranslationX()
const noexcept {
return mat02; }
276 float mat00, mat01, mat02;
277 float mat10, mat11, mat12;
285 #endif // JUCE_AFFINETRANSFORM_H_INCLUDED
#define noexcept
Definition: juce_CompilerSupport.h:141
#define JUCE_API
Definition: juce_StandardHeader.h:139
bool operator==(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:565
#define JUCE_LEAK_DETECTOR(OwnerClass)
Definition: juce_LeakedObjectDetector.h:141
bool operator!=(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:566