JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::RenderingHelpers::TranslationOrTransform Class Reference

Holds either a simple integer translation, or an affine transform. More...

#include <juce_RenderingHelpers.h>

Collaboration diagram for juce::RenderingHelpers::TranslationOrTransform:

Public Member Functions

 TranslationOrTransform () noexcept
 
 TranslationOrTransform (Point< int > origin) noexcept
 
 TranslationOrTransform (const TranslationOrTransform &other) noexcept
 
void addTransform (const AffineTransform &t) noexcept
 
template<typename Type >
Rectangle< Type > deviceSpaceToUserSpace (Rectangle< Type > r) const noexcept
 
float getPhysicalPixelScaleFactor () const noexcept
 
AffineTransform getTransform () const noexcept
 
AffineTransform getTransformWith (const AffineTransform &userTransform) const noexcept
 
bool isIdentity () const noexcept
 
void moveOriginInDeviceSpace (Point< int > delta) noexcept
 
void setOrigin (Point< int > delta) noexcept
 
template<typename RectangleOrPoint >
RectangleOrPoint transformed (RectangleOrPoint r) const noexcept
 
Rectangle< inttranslated (Rectangle< int > r) const noexcept
 
Rectangle< floattranslated (Rectangle< float > r) const noexcept
 

Public Attributes

AffineTransform complexTransform
 
bool isOnlyTranslated = true
 
bool isRotated = false
 
Point< intoffset
 

Detailed Description

Holds either a simple integer translation, or an affine transform.

{Graphics}

Constructor & Destructor Documentation

◆ TranslationOrTransform() [1/3]

juce::RenderingHelpers::TranslationOrTransform::TranslationOrTransform ( )
inlinenoexcept

◆ TranslationOrTransform() [2/3]

juce::RenderingHelpers::TranslationOrTransform::TranslationOrTransform ( Point< int origin)
inlinenoexcept

◆ TranslationOrTransform() [3/3]

juce::RenderingHelpers::TranslationOrTransform::TranslationOrTransform ( const TranslationOrTransform other)
inlinenoexcept

Member Function Documentation

◆ addTransform()

void juce::RenderingHelpers::TranslationOrTransform::addTransform ( const AffineTransform t)
inlinenoexcept

◆ deviceSpaceToUserSpace()

template<typename Type >
Rectangle<Type> juce::RenderingHelpers::TranslationOrTransform::deviceSpaceToUserSpace ( Rectangle< Type >  r) const
inlinenoexcept

◆ getPhysicalPixelScaleFactor()

float juce::RenderingHelpers::TranslationOrTransform::getPhysicalPixelScaleFactor ( ) const
inlinenoexcept

◆ getTransform()

AffineTransform juce::RenderingHelpers::TranslationOrTransform::getTransform ( ) const
inlinenoexcept

◆ getTransformWith()

AffineTransform juce::RenderingHelpers::TranslationOrTransform::getTransformWith ( const AffineTransform userTransform) const
inlinenoexcept

References complexTransform, isOnlyTranslated, and offset.

Referenced by addTransform().

◆ isIdentity()

bool juce::RenderingHelpers::TranslationOrTransform::isIdentity ( ) const
inlinenoexcept

◆ moveOriginInDeviceSpace()

void juce::RenderingHelpers::TranslationOrTransform::moveOriginInDeviceSpace ( Point< int delta)
inlinenoexcept

◆ setOrigin()

void juce::RenderingHelpers::TranslationOrTransform::setOrigin ( Point< int delta)
inlinenoexcept

◆ transformed()

template<typename RectangleOrPoint >
RectangleOrPoint juce::RenderingHelpers::TranslationOrTransform::transformed ( RectangleOrPoint  r) const
inlinenoexcept

◆ translated() [1/2]

Rectangle<int> juce::RenderingHelpers::TranslationOrTransform::translated ( Rectangle< int r) const
inlinenoexcept

References isOnlyTranslated, jassert, and offset.

◆ translated() [2/2]

Rectangle<float> juce::RenderingHelpers::TranslationOrTransform::translated ( Rectangle< float r) const
inlinenoexcept

Member Data Documentation

◆ complexTransform

◆ isOnlyTranslated

◆ isRotated

bool juce::RenderingHelpers::TranslationOrTransform::isRotated = false

Referenced by addTransform().

◆ offset

Point<int> juce::RenderingHelpers::TranslationOrTransform::offset

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