DisplayTransformation
touchgfx/transforms/DisplayTransformation.hpp
Defines transformations from display space to framebuffer space. The display might be (considered) in portrait mode from 0,0 to 272,480, while the actual framebuffer is from 0,0 to 480,272. This class handles the transformations.
Public Functions
void | transformDisplayToFrameBuffer(float & x, float & y) |
Transform x,y from display to framebuffer coordinates. | |
void | transformDisplayToFrameBuffer(float & x, float & y, const Rect & in) |
Transform x,y from coordinates relative to the in rect to framebuffer coordinates. | |
void | transformDisplayToFrameBuffer(int16_t & x, int16_t & y) |
Transform x,y from display to framebuffer coordinates. | |
void | transformDisplayToFrameBuffer(int16_t & x, int16_t & y, const Rect & in) |
Transform x,y from coordinates relative to the in rect to framebuffer coordinates. | |
void | transformDisplayToFrameBuffer(Rect & r) |
Transform rectangle from display to framebuffer coordinates. | |
void | transformDisplayToFrameBuffer(Rect & r, const Rect & in) |
Transform rectangle r from coordinates relative to the in rect to framebuffer coordinates. | |
void | transformFrameBufferToDisplay(int16_t & x, int16_t & y) |
Transform x,y from framebuffer to display coordinates. | |
void | transformFrameBufferToDisplay(Rect & r) |
Transform rectangle from framebuffer to display coordinates. | |
Public Functions Documentation
transformDisplayToFrameBuffer
static void transformDisplayToFrameBuffer | ( | float & | x , | ||
float & | y | ||||
) |
Transform x,y from display to framebuffer coordinates.
x | the x part to translate. |
y | the y part to translate. |
transformDisplayToFrameBuffer
static void transformDisplayToFrameBuffer | ( | float & | x , | ||
float & | y , | ||||
const Rect & | in | ||||
) |
Transform x,y from coordinates relative to the in rect to framebuffer coordinates.
Transform x,y from coordinates relative to the in rect to framebuffer coordinates.
x | the x part to translate. |
y | the y part to translate. |
in | the rectangle defining the coordinate space. |
transformDisplayToFrameBuffer
static void transformDisplayToFrameBuffer | ( | int16_t & | x , | ||
int16_t & | y | ||||
) |
Transform x,y from display to framebuffer coordinates.
x | the x part to translate. |
y | the y part to translate. |
transformDisplayToFrameBuffer
static void transformDisplayToFrameBuffer | ( | int16_t & | x , | ||
int16_t & | y , | ||||
const Rect & | in | ||||
) |
Transform x,y from coordinates relative to the in rect to framebuffer coordinates.
Transform x,y from coordinates relative to the in rect to framebuffer coordinates.
x | the x part to translate. |
y | the y part to translate. |
in | the rectangle defining the coordinate space. |
transformDisplayToFrameBuffer
static void transformDisplayToFrameBuffer | ( | Rect & | r | ) | |
Transform rectangle from display to framebuffer coordinates.
r | the rectangle to translate. |
transformDisplayToFrameBuffer
static void transformDisplayToFrameBuffer | ( | Rect & | r , | ||
const Rect & | in | ||||
) |
Transform rectangle r from coordinates relative to the in rect to framebuffer coordinates.
Transform rectangle r from coordinates relative to the in rect to framebuffer coordinates.
r | the rectangle to translate. |
in | the rectangle defining the coordinate space. |
transformFrameBufferToDisplay
static void transformFrameBufferToDisplay | ( | int16_t & | x , | ||
int16_t & | y | ||||
) |
Transform x,y from framebuffer to display coordinates.
x | the x part to translate. |
y | the y part to translate. |
transformFrameBufferToDisplay
static void transformFrameBufferToDisplay | ( | Rect & | r | ) | |
Transform rectangle from framebuffer to display coordinates.
r | the rectangle to translate. |