JUCE  v6.1.6 (6.0.8-1114)
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 ()=default
 
 TranslationOrTransform (const TranslationOrTransform &other)=default
 
 TranslationOrTransform (Point< int > origin) 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< floattranslated (Rectangle< float > r) const noexcept
 
Rectangle< inttranslated (Rectangle< int > 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.

@tags{Graphics}

Constructor & Destructor Documentation

◆ TranslationOrTransform() [1/3]

juce::RenderingHelpers::TranslationOrTransform::TranslationOrTransform ( )
default

◆ TranslationOrTransform() [2/3]

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

◆ TranslationOrTransform() [3/3]

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

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

References juce::gl::offset, and juce::gl::r.

◆ 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

◆ isIdentity()

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

References juce::gl::offset.

◆ moveOriginInDeviceSpace()

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

References juce::gl::offset.

◆ setOrigin()

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

◆ transformed()

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

References jassert, and juce::gl::r.

◆ translated() [1/2]

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

◆ translated() [2/2]

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

Member Data Documentation

◆ complexTransform

AffineTransform juce::RenderingHelpers::TranslationOrTransform::complexTransform

◆ isOnlyTranslated

bool juce::RenderingHelpers::TranslationOrTransform::isOnlyTranslated = true

◆ isRotated

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

◆ offset

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

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