mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
AffineTransform: Add horizontalFlip()
This commit is contained in:
parent
2f05ebe8d2
commit
7f22db449a
2 changed files with 10 additions and 0 deletions
|
|
@ -188,6 +188,12 @@ AffineTransform AffineTransform::verticalFlip (float height) noexcept
|
||||||
0.0f, -1.0f, height };
|
0.0f, -1.0f, height };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AffineTransform AffineTransform::horizontalFlip (float width) noexcept
|
||||||
|
{
|
||||||
|
return { -1.0f, 0.0f, width,
|
||||||
|
0.0f, 1.0f, 0.0f };
|
||||||
|
}
|
||||||
|
|
||||||
AffineTransform AffineTransform::inverted() const noexcept
|
AffineTransform AffineTransform::inverted() const noexcept
|
||||||
{
|
{
|
||||||
double determinant = getDeterminant();
|
double determinant = getDeterminant();
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,10 @@ public:
|
||||||
*/
|
*/
|
||||||
static AffineTransform verticalFlip (float height) noexcept;
|
static AffineTransform verticalFlip (float height) noexcept;
|
||||||
|
|
||||||
|
/** Returns a transform that will flip coordinates horizontally within a window of the given width.
|
||||||
|
*/
|
||||||
|
static AffineTransform horizontalFlip (float width) noexcept;
|
||||||
|
|
||||||
/** Returns a matrix which is the inverse operation of this one.
|
/** Returns a matrix which is the inverse operation of this one.
|
||||||
|
|
||||||
Some matrices don't have an inverse - in this case, the method will just return
|
Some matrices don't have an inverse - in this case, the method will just return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue