JUCE  v5.1.1-3-g1a0b28c73
JUCE API
RenderingHelpers::TranslationOrTransform Class Reference

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

#include <juce_RenderingHelpers.h>

Collaboration diagram for RenderingHelpers::TranslationOrTransform:

Public Member Functions

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

Public Attributes

AffineTransform complexTransform
 
bool isOnlyTranslated
 
bool isRotated
 
Point< intoffset
 

Detailed Description

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

Constructor & Destructor Documentation

◆ TranslationOrTransform() [1/2]

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

◆ TranslationOrTransform() [2/2]

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

Member Function Documentation

◆ addTransform()

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

◆ deviceSpaceToUserSpace()

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

◆ getPhysicalPixelScaleFactor()

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

◆ getTransform()

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

◆ getTransformWith()

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

References complexTransform, isOnlyTranslated, and offset.

Referenced by addTransform().

◆ moveOriginInDeviceSpace()

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

◆ setOrigin()

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

◆ transformed()

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

◆ translated() [1/2]

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

References isOnlyTranslated, jassert, and offset.

◆ translated() [2/2]

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

Member Data Documentation

◆ complexTransform

◆ isOnlyTranslated

◆ isRotated

bool RenderingHelpers::TranslationOrTransform::isRotated

Referenced by addTransform().

◆ offset

Point<int> RenderingHelpers::TranslationOrTransform::offset

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