hal_gfx_transitions.h
Go to the documentation of this file.
1 
2 /** @addtogroup GRAPHICS_SDK Graphics
3  * @{
4  */
5 
6 /** @defgroup HAL_GFX_TRANSITIONS Hal gfx transitions
7  * @brief GPU transitions.
8  * @{
9  */
10 
11 #ifndef HAL_GFX_TRANSITIONS_H__
12 #define HAL_GFX_TRANSITIONS_H__
13 
14 #include "hal_gfx_blender.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /**
21  * @defgroup HAL_GFX_TRANSITIONS_ENUM Enumerations
22  * @{
23  */
24 /**@brief Definition of transition effect. */
25 typedef enum {
26  HAL_GFX_TRANS_LINEAR_H, /**< Linear transition horizontally. */
27  HAL_GFX_TRANS_CUBE_H, /**< Cubic transition horizontally. */
28  HAL_GFX_TRANS_INNERCUBE_H, /**< Inner Cube transition horizontally. */
29  HAL_GFX_TRANS_STACK_H, /**< Stack transition horizontally. */
30  HAL_GFX_TRANS_LINEAR_V, /**< Linear transition vertically. */
31  HAL_GFX_TRANS_CUBE_V, /**< Cubic transition vertically. */
32  HAL_GFX_TRANS_INNERCUBE_V, /**< Inner Cube transition vertically. */
33  HAL_GFX_TRANS_STACK_V, /**< Stack transition vertically. */
34  HAL_GFX_TRANS_FADE, /**< Fade transition. */
35  HAL_GFX_TRANS_FADE_ZOOM, /**< Fade-zoom transition. */
36  HAL_GFX_TRANS_COVER, /**< Cover transition. */
37  HAL_GFX_TRANS_MAX, /**< MAX. */
38  HAL_GFX_TRANS_NONE, /**< NONE. */
40 /** @} */
41 
42 /**
43  * @defgroup HAL_GFX_TRANSITIONS_FUNCTION Functions
44  * @{
45  */
46 /**
47  *****************************************************************************************
48  * @brief Transition from 'initial' texture to 'final' texture. The transition is complete when 'step' is 0 or 1
49  *
50  * @param[in] effect: Transition effect
51  * @param[in] initial: Initial texture
52  * @param[in] final: Final texture
53  * @param[in] blending_mode: Blending mode
54  * @param[in] step: Transition step within [0.f , 1.f] range
55  * @param[in] width: Texture width
56  * @param[in] height: Texture height
57  *
58  */
60  uint32_t blending_mode, float step, int width, int height);
61 
62 /**
63  *****************************************************************************************
64  * @brief Linear transition horizontally. When 'step' changes from zero to one, textures move from right to left,
65  * otherwise textures move from left to right. The transition is complete when 'step' is 0 or 1.
66  *
67  * @param[in] left: Texture on the left side
68  * @param[in] right: Texture on the right side
69  * @param[in] blending_mode: Blending mode
70  * @param[in] step: Current step within [0.f , 1.f] range
71  * @param[in] width: Texture width
72  *
73  *****************************************************************************************
74  */
76  uint32_t blending_mode, float step, int width);
77 
78 /**
79  *****************************************************************************************
80  * @brief Linear transition vertically. When 'step' changes from zero to one, textures move from top to bottom,
81  * otherwise textures move from bottom to top. The transition is complete when 'step' is 0 or 1.
82  *
83  * @param[in] up: Texture on the top side
84  * @param[in] down: Texture on the bottom side
85  * @param[in] blending_mode: Blending mode
86  * @param[in] step: Current step within [0.f , 1.f] range
87  * @param[in] height: Texture height
88  *
89  *****************************************************************************************
90  */
92  uint32_t blending_mode, float step, int height);
93 
94 /**
95  *****************************************************************************************
96  * @brief Cubic (textures are mapped on the external faces of a cube) transition horizontally. When 'step' changes from zero to one, textures move from left to right,
97  * otherwise textures move from right to left. The transition is complete when 'step' is 0 or 1.
98  *
99  * @param[in] left: Texture on the left side
100  * @param[in] right: Texture on the right side
101  * @param[in] blending_mode; Blending mode
102  * @param[in] step: Current step within [0.f , 1.f] range
103  * @param[in] width: Texture width
104  * @param[in] height: Texture height
105  *
106  *****************************************************************************************
107  */
109  uint32_t blending_mode, float step, int width, int height);
110 
111 /**
112  *****************************************************************************************
113  * @brief Cube (textures are mapped on the external faces of a cube) transition vertically. When 'step' changes from zero to one, textures move from top to bottom,
114  * otherwise textures move from bottom to top. The transition is complete when 'step' is 0 or 1.
115  *
116  * @param[in] up: Texture on the top side
117  * @param[in] down: Texture on the bottom side
118  * @param[in] blending_mode: Blending mode
119  * @param[in] step: Current step within [0.f , 1.f] range
120  * @param[in] width: Texture width
121  * @param[in] height: Texture height
122  *
123  *****************************************************************************************
124  */
126  uint32_t blending_mode, float step, int width, int height);
127 
128 /**
129  *****************************************************************************************
130  * @brief Inner Cube (textures are mapped on the internal faces of a cube) transition horizontally. When 'step' changes from zero to one, textures move from left to right,
131  * otherwise textures move from right to left. The transition is complete when 'step' is 0 or 1.
132  *
133  * @param[in] left: Texture on the left side
134  * @param[in] right: Texture on the right side
135  * @param[in] blending_mode: Blending mode
136  * @param[in] step: Current step within [0.f , 1.f] range
137  * @param[in] width: Texture width
138  * @param[in] height: Texture height
139  *
140  *****************************************************************************************
141  */
143  uint32_t blending_mode, float step, int width, int height);
144 
145 /**
146  *****************************************************************************************
147  * @brief Inner Cube (textures are mapped on the internal faces of a cube) transition vertically. When 'step' changes from zero to one, textures move from top to bottom,
148  * otherwise textures move from bottom to top. The transition The transition is complete when 'step' is 0 or 1.
149  *
150  * @param[in] up: Texture on the top side
151  * @param[in] down: Texture on the bottom side
152  * @param[in] blending_mode: Blending mode
153  * @param[in] step: Current step within [0.f , 1.f] range
154  * @param[in] width: Texture width
155  * @param[in] height: Texture height
156  *
157  *****************************************************************************************
158  */
160  uint32_t blending_mode, float step, int width, int height);
161 
162 /**
163  *****************************************************************************************
164  * @brief Stack transition horizontally. When 'step' changes from zero to one, textures move from left to right,
165  * otherwise textures move from right to left. The transition is complete when 'step' is 0 or 1.
166  *
167  * @param[in] left: Texture on the left side
168  * @param[in] right: Texture on the right side
169  * @param[in] step: Current step within [0.f , 1.f] range
170  * @param[in] width: Texture width
171  * @param[in] height: Texture height
172  *
173  *****************************************************************************************
174  */
176  int width, int height);
177 
178 /**
179  *****************************************************************************************
180  * @brief Stack transition vertically. When 'step' moves from zero to one, textures move from top to bottom,
181  * otherwise textures move from bottom to top. The transition is complete when 'step' is 0 or 1.
182  *
183  * @param[in] up: Texture on the top side
184  * @param[in] down: Texture on the bottom side
185  * @param[in] step: Current step within [0.f , 1.f] range
186  * @param[in] width: Texture width
187  * @param[in] height: Texture height
188  *
189  *****************************************************************************************
190  */
192  int width, int height);
193 
194 /**
195  *****************************************************************************************
196  * @brief Fade transition. Initial texture is being faded out, while final texture is being faded in.
197  * The transition is complete when 'step' is 0 or 1.
198  *
199  * @param[in] initial: Texture initial
200  * @param[in] final: Texture final
201  * @param[in] blending_mode: Blending mode
202  * @param[in] step: Current step within [0.f , 1.f] range
203  * @param[in] width: Texture width
204  * @param[in] height: Texture height
205  *
206  *****************************************************************************************
207  */
209  uint32_t blending_mode, float step, int width, int height);
210 
211 /**
212  *****************************************************************************************
213  * @brief Fade-zoom transition. Initial texture is being zoomed and faded out, while final texture is being zoomed and faded in.
214  * The transition is complete when 'step' is 0 or 1.
215  *
216  * @param[in] initial: Initial texture
217  * @param[in] final: Final texture
218  * @param[in] blending_mode: Blending mode
219  * @param[in] step: Current step within [0.f , 1.f] range
220  * @param[in] width: Texture width
221  * @param[in] height: Texture height
222  *
223  *****************************************************************************************
224  */
226  uint32_t blending_mode, float step, int width, int height);
227 /** @} */
228 
229 #ifdef __cplusplus
230 }
231 #endif
232 
233 #endif
234 
235 /** @} */
236 /** @} */
237 
HAL_GFX_TRANS_MAX
@ HAL_GFX_TRANS_MAX
Definition: hal_gfx_transitions.h:37
HAL_GFX_TRANS_FADE
@ HAL_GFX_TRANS_FADE
Definition: hal_gfx_transitions.h:34
hal_gfx_transition
void hal_gfx_transition(hal_gfx_transition_t effect, hal_gfx_tex_t initial, hal_gfx_tex_t final, uint32_t blending_mode, float step, int width, int height)
Transition from 'initial' texture to 'final' texture. The transition is complete when 'step' is 0 or ...
hal_gfx_transition_t
hal_gfx_transition_t
Definition of transition effect.
Definition: hal_gfx_transitions.h:25
hal_gfx_blender.h
HAL_GFX_TRANS_NONE
@ HAL_GFX_TRANS_NONE
Definition: hal_gfx_transitions.h:38
HAL_GFX_TRANS_LINEAR_V
@ HAL_GFX_TRANS_LINEAR_V
Definition: hal_gfx_transitions.h:30
hal_gfx_transition_linear_hor
void hal_gfx_transition_linear_hor(hal_gfx_tex_t left, hal_gfx_tex_t right, uint32_t blending_mode, float step, int width)
Linear transition horizontally. When 'step' changes from zero to one, textures move from right to lef...
HAL_GFX_TRANS_INNERCUBE_H
@ HAL_GFX_TRANS_INNERCUBE_H
Definition: hal_gfx_transitions.h:28
HAL_GFX_TRANS_CUBE_V
@ HAL_GFX_TRANS_CUBE_V
Definition: hal_gfx_transitions.h:31
HAL_GFX_TRANS_STACK_V
@ HAL_GFX_TRANS_STACK_V
Definition: hal_gfx_transitions.h:33
hal_gfx_transition_cube_ver
void hal_gfx_transition_cube_ver(hal_gfx_tex_t up, hal_gfx_tex_t down, uint32_t blending_mode, float step, int width, int height)
Cube (textures are mapped on the external faces of a cube) transition vertically. When 'step' changes...
HAL_GFX_TRANS_CUBE_H
@ HAL_GFX_TRANS_CUBE_H
Definition: hal_gfx_transitions.h:27
HAL_GFX_TRANS_FADE_ZOOM
@ HAL_GFX_TRANS_FADE_ZOOM
Definition: hal_gfx_transitions.h:35
HAL_GFX_TRANS_STACK_H
@ HAL_GFX_TRANS_STACK_H
Definition: hal_gfx_transitions.h:29
hal_gfx_transition_cube_hor
void hal_gfx_transition_cube_hor(hal_gfx_tex_t left, hal_gfx_tex_t right, uint32_t blending_mode, float step, int width, int height)
Cubic (textures are mapped on the external faces of a cube) transition horizontally....
hal_gfx_transition_stack_ver
void hal_gfx_transition_stack_ver(hal_gfx_tex_t up, hal_gfx_tex_t down, float step, int width, int height)
Stack transition vertically. When 'step' moves from zero to one, textures move from top to bottom,...
hal_gfx_transition_fade_zoom
void hal_gfx_transition_fade_zoom(hal_gfx_tex_t initial, hal_gfx_tex_t final, uint32_t blending_mode, float step, int width, int height)
Fade-zoom transition. Initial texture is being zoomed and faded out, while final texture is being zoo...
HAL_GFX_TRANS_LINEAR_H
@ HAL_GFX_TRANS_LINEAR_H
Definition: hal_gfx_transitions.h:26
hal_gfx_transition_innercube_ver
void hal_gfx_transition_innercube_ver(hal_gfx_tex_t up, hal_gfx_tex_t down, uint32_t blending_mode, float step, int width, int height)
Inner Cube (textures are mapped on the internal faces of a cube) transition vertically....
HAL_GFX_TRANS_COVER
@ HAL_GFX_TRANS_COVER
Definition: hal_gfx_transitions.h:36
HAL_GFX_TRANS_INNERCUBE_V
@ HAL_GFX_TRANS_INNERCUBE_V
Definition: hal_gfx_transitions.h:32
hal_gfx_transition_fade
void hal_gfx_transition_fade(hal_gfx_tex_t initial, hal_gfx_tex_t final, uint32_t blending_mode, float step, int width, int height)
Fade transition. Initial texture is being faded out, while final texture is being faded in....
hal_gfx_transition_innercube_hor
void hal_gfx_transition_innercube_hor(hal_gfx_tex_t left, hal_gfx_tex_t right, uint32_t blending_mode, float step, int width, int height)
Inner Cube (textures are mapped on the internal faces of a cube) transition horizontally....
hal_gfx_transition_linear_ver
void hal_gfx_transition_linear_ver(hal_gfx_tex_t up, hal_gfx_tex_t down, uint32_t blending_mode, float step, int height)
Linear transition vertically. When 'step' changes from zero to one, textures move from top to bottom,...
hal_gfx_tex_t
hal_gfx_tex_t
Graphics Texture.
Definition: hal_gfx_graphics.h:29
hal_gfx_transition_stack_hor
void hal_gfx_transition_stack_hor(hal_gfx_tex_t left, hal_gfx_tex_t right, float step, int width, int height)
Stack transition horizontally. When 'step' changes from zero to one, textures move from left to right...