mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added method AffineTransform::withAbsoluteTranslation
This commit is contained in:
parent
29419e480e
commit
d9f1b72067
2 changed files with 10 additions and 0 deletions
|
|
@ -105,6 +105,12 @@ AffineTransform AffineTransform::translation (const float dx, const float dy) no
|
|||
0, 1.0f, dy);
|
||||
}
|
||||
|
||||
AffineTransform AffineTransform::withAbsoluteTranslation (const float tx, const float ty) const noexcept
|
||||
{
|
||||
return AffineTransform (mat00, mat01, tx,
|
||||
mat10, mat11, ty);
|
||||
}
|
||||
|
||||
AffineTransform AffineTransform::rotated (const float rad) const noexcept
|
||||
{
|
||||
const float cosRad = std::cos (rad);
|
||||
|
|
|
|||
|
|
@ -133,6 +133,10 @@ public:
|
|||
static AffineTransform translation (float deltaX,
|
||||
float deltaY) noexcept;
|
||||
|
||||
/** Returns a copy of this transform with the specified translation matrix values. */
|
||||
AffineTransform withAbsoluteTranslation (float translationX,
|
||||
float translationY) const noexcept;
|
||||
|
||||
/** Returns a transform which is the same as this one followed by a rotation.
|
||||
|
||||
The rotation is specified by a number of radians to rotate clockwise, centred around
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue