TouchGFX
Select one of the symbols to view example projects that use it.
Symbol previews are coming soon...
Outline
#define DISPLAYTRANSFORMATION_HPP
#include <touchgfx/hal/Types.hpp>
touchgfx
DisplayTransformation
public:
transformDisplayToFrameBuffer(int16_t &, int16_t &)
transformDisplayToFrameBuffer(float &, float &)
transformFrameBufferToDisplay(int16_t &, int16_t &)
transformDisplayToFrameBuffer(int16_t &, int16_t &, const Rect &)
transformDisplayToFrameBuffer(float &, float &, const Rect &)
transformDisplayToFrameBuffer(Rect &)
transformDisplayToFrameBuffer(Rect &, const Rect &)
Files
loading...
CodeScope
STM32 Libraries and Samples
TouchGFX
touchgfx/framework/include/touchgfx/transforms/DisplayTransformation.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/**
******************************************************************************
* This file is part of the TouchGFX 4.10.0 distribution.
*
* <h2><center>© Copyright (c) 2018 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* ... */
#ifndef
DISPLAYTRANSFORMATION_HPP
#define
DISPLAYTRANSFORMATION_HPP
#include
<
touchgfx
/
hal
/
Types.hpp>
namespace
touchgfx
{
/**
* @class DisplayTransformation DisplayTransformation.hpp touchgfx/transforms/DisplayTransformation.hpp
*
* @brief Defines transformations from display space to frame buffer space.
*
* Defines transformations from display space to frame buffer space. The display might
* be (considered) in portrait mode from 0,0 to 272,480, while the actual frame buffer
* is from 0,0 to 480,272. This class handles the transformations.
*/
/* ... */
class
DisplayTransformation
{
public
:
/**
* @fn static void DisplayTransformation::transformDisplayToFrameBuffer(int16_t& x, int16_t& y);
*
* @brief Transform x,y from display to frame buffer coordinates.
*
* Transform x,y from display to frame buffer coordinates.
*
* @param [in,out] x the x part to translate.
* @param [in,out] y the y part to translate.
*/
/* ... */
static
void
transformDisplayToFrameBuffer
(
int16_t
&
x
,
int16_t
&
y
)
;
/**
* @fn static void DisplayTransformation::transformDisplayToFrameBuffer(float& x, float& y);
*
* @brief Transform x,y from display to frame buffer coordinates.
*
* Transform x,y from display to frame buffer coordinates.
*
* @param [in,out] x the x part to translate.
* @param [in,out] y the y part to translate.
*/
/* ... */
static
void
transformDisplayToFrameBuffer
(
float
&
x
,
float
&
y
)
;
/**
* @fn static void DisplayTransformation::transformFrameBufferToDisplay(int16_t& x, int16_t& y);
*
* @brief Transform x,y from frame buffer to display coordinates.
*
* Transform x,y from frame buffer to display coordinates.
*
* @param [in,out] x the x part to translate.
* @param [in,out] y the y part to translate.
*/
/* ... */
static
void
transformFrameBufferToDisplay
(
int16_t
&
x
,
int16_t
&
y
)
;
/**
* @fn static void DisplayTransformation::transformDisplayToFrameBuffer(int16_t& x, int16_t& y, const Rect& in);
*
* @brief Transform x,y from coordinates relative to the in rect to frame buffer coordinates.
*
* Transform x,y from coordinates relative to the in rect to frame buffer
* coordinates.
*
* @param [in,out] x the x part to translate.
* @param [in,out] y the y part to translate.
* @param in the rectangle defining the coordinate space.
*/
/* ... */
static
void
transformDisplayToFrameBuffer
(
int16_t
&
x
,
int16_t
&
y
,
const
Rect
&
in
)
;
/**
* @fn static void DisplayTransformation::transformDisplayToFrameBuffer(float& x, float& y, const Rect& in);
*
* @brief Transform x,y from coordinates relative to the in rect to frame buffer coordinates.
*
* Transform x,y from coordinates relative to the in rect to frame buffer
* coordinates.
*
* @param [in,out] x the x part to translate.
* @param [in,out] y the y part to translate.
* @param in the rectangle defining the coordinate space.
*/
/* ... */
static
void
transformDisplayToFrameBuffer
(
float
&
x
,
float
&
y
,
const
Rect
&
in
)
;
/**
* @fn static void DisplayTransformation::transformDisplayToFrameBuffer(Rect& r);
*
* @brief Transform rectangle from display to frame buffer coordinates.
*
* Transform rectangle from display to frame buffer coordinates.
*
* @param [in,out] r the rectangle to translate.
*/
/* ... */
static
void
transformDisplayToFrameBuffer
(
Rect
&
r
)
;
/**
* @fn static void DisplayTransformation::transformDisplayToFrameBuffer(Rect& r, const Rect& in);
*
* @brief Transform rectangle r from coordinates relative to the in rect to frame buffer
* coordinates.
*
* Transform rectangle r from coordinates relative to the in rect to frame buffer
* coordinates.
*
* @param [in,out] r the rectangle to translate.
* @param in the rectangle defining the coordinate space.
*/
/* ... */
static
void
transformDisplayToFrameBuffer
(
Rect
&
r
,
const
Rect
&
in
)
;
public:
...
}
;
...
}
// namespace touchgfx
/* ... */
#endif
// DISPLAYTRANSFORMATION_HPP