hal_gfx_raster.h
Go to the documentation of this file.
1 
2 
3 /** @addtogroup GRAPHICS_SDK Graphics
4  * @{
5  */
6 
7 /** @defgroup HAL_GFX_RASTER Hal gfx raster
8  * @brief GPU raster interfaces.
9  * @{
10  */
11 
12 #ifndef HAL_GFX_RASTER_H__
13 #define HAL_GFX_RASTER_H__
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 /**
19  * @defgroup HAL_GFX_RASTER_FUNCTION Functions
20  * @{
21  */
22 /**
23  *****************************************************************************************
24  * @brief Setting the raster color
25  *
26  * @param[in] rgba8888: Color value
27  *****************************************************************************************
28  */
29 void hal_gfx_set_raster_color(uint32_t rgba8888);
30 
31 /**
32  *****************************************************************************************
33  * @brief Raster a pixel
34  *
35  * @param[in] x: x coordinate of the pixel
36  * @param[in] y: x coordinate of the pixel
37  *****************************************************************************************
38  */
39 void hal_gfx_raster_pixel(int x, int y);
40 
41 /**
42  *****************************************************************************************
43  * @brief Raster a line
44  *
45  * @param[in] x0: x coordinate at the beginning of the line
46  * @param[in] y0: y coordinate at the beginning of the line
47  * @param[in] x1: x coordinate at the end of the line
48  * @param[in] y1: y coordinate at the end of the line
49  *****************************************************************************************
50  */
51 void hal_gfx_raster_line(int x0, int y0, int x1, int y1);
52 
53 /**
54  *****************************************************************************************
55  * @brief Raster a triangle with fixed point(16.16)
56  *
57  * @param[in] x0fx: x coordinate at the first vertex of the triangle
58  * @param[in] y0fx: y coordinate at the first vertex of the triangle
59  * @param[in] x1fx: x coordinate at the second vertex of the triangle
60  * @param[in] y1fx: y coordinate at the second vertex of the triangle
61  * @param[in] x2fx: x coordinate at the third vertex of the triangle
62  * @param[in] y2fx: y coordinate at the third vertex of the triangle
63  *****************************************************************************************
64  */
65 void hal_gfx_raster_triangle_fx(int x0fx, int y0fx, int x1fx, int y1fx, int x2fx, int y2fx);
66 
67 /**
68  *****************************************************************************************
69  * @brief Raster a rectangle
70  *
71  * @param[in] x: x coordinate of the upper left vertex of the rectangle
72  * @param[in] y: y coordinate of the upper left vertex of the rectangle
73  * @param[in] w: width of the rectangle
74  * @param[in] h: height of the rectangle
75  *****************************************************************************************
76  */
77 void hal_gfx_raster_rect(int x, int y, int w, int h);
78 
79 /**
80  *****************************************************************************************
81  * @brief Raster a rectangle with rounded edges
82  *
83  * @param[in] x0: x coordinate of the upper left vertex of the rectangle
84  * @param[in] y0: y coordinate of the upper left vertex of the rectangle
85  * @param[in] w: width of the rectangle
86  * @param[in] h: height of the rectangle
87  * @param[in] r: corner radius
88  *****************************************************************************************
89  */
90 void hal_gfx_raster_rounded_rect(int x0, int y0, int w, int h, int r);
91 
92 /**
93  *****************************************************************************************
94  * @brief Raster a quad with fixed point(16.16)
95  *
96  * @param[in] x0fx: x coordinate at the first vertex of the quadrilateral
97  * @param[in] y0fx: y coordinate at the first vertex of the quadrilateral
98  * @param[in] x1fx: x coordinate at the second vertex of the quadrilateral
99  * @param[in] y1fx: y coordinate at the second vertex of the quadrilateral
100  * @param[in] x2fx: x coordinate at the third vertex of the quadrilateral
101  * @param[in] y2fx: y coordinate at the third vertex of the quadrilateral
102  * @param[in] x3fx: x coordinate at the fourth vertex of the quadrilateral
103  * @param[in] y3fx: y coordinate at the fourth vertex of the quadrilateral
104  *****************************************************************************************
105  */
106 void hal_gfx_raster_quad_fx(int x0fx, int y0fx, int x1fx, int y1fx, int x2fx, int y2fx, int x3fx, int y3fx);
107 
108 /**
109  *****************************************************************************************
110  * @brief Raster a triangle
111  *
112  * @param[in] x0: x coordinate at the first vertex of the triangle
113  * @param[in] y0: y coordinate at the first vertex of the triangle
114  * @param[in] x1: x coordinate at the second vertex of the triangle
115  * @param[in] y1: y coordinate at the second vertex of the triangle
116  * @param[in] x2: x coordinate at the third vertex of the triangle
117  * @param[in] y2: y coordinate at the third vertex of the triangle
118  *****************************************************************************************
119  */
120 void hal_gfx_raster_triangle (int x0, int y0, int x1, int y1, int x2, int y2);
121 
122 /**
123  *****************************************************************************************
124  * @brief Raster a quad
125  *
126  * @param[in] x0: x coordinate at the first vertex of the quadrilateral
127  * @param[in] y0: y coordinate at the first vertex of the quadrilateral
128  * @param[in] x1: x coordinate at the second vertex of the quadrilateral
129  * @param[in] y1: y coordinate at the second vertex of the quadrilateral
130  * @param[in] x2: x coordinate at the third vertex of the quadrilateral
131  * @param[in] y2: y coordinate at the third vertex of the quadrilateral
132  * @param[in] x3: x coordinate at the fourth vertex of the quadrilateral
133  * @param[in] y3: y coordinate at the fourth vertex of the quadrilateral
134  *****************************************************************************************
135  */
136 void hal_gfx_raster_quad (int x0,int y0,int x1,int y1,int x2,int y2,int x3,int y3);
137 
138 /**
139  *****************************************************************************************
140  * @brief Raster a circle with Anti-Aliasing (if available)
141  *
142  * @param[in] x: x coordinate of the circle's center
143  * @param[in] y: y coordinate of the circle's center
144  * @param[in] r: circle's radius
145  *****************************************************************************************
146  */
147 void hal_gfx_raster_circle_aa(float x, float y, float r);
148 
149 /**
150  *****************************************************************************************
151  * @brief Raster a circle with Anti-Aliasing (if available) and specified width
152  *
153  * @param[in] x: x coordinate of the circle's center
154  * @param[in] y: y coordinate of the circle's center
155  * @param[in] r: circle's radius
156  * @param[in] w: pencil width
157  *****************************************************************************************
158  */
159 void hal_gfx_raster_stroked_circle_aa(float x, float y, float r, float w);
160 
161 /**
162  *****************************************************************************************
163  * @brief Raster a rectangle with fixed point(16.16)
164  *
165  * @param[in] x: x coordinate of the upper left vertex of the rectangle
166  * @param[in] y: y coordinate of the upper left vertex of the rectangle
167  * @param[in] w: width of the rectangle
168  * @param[in] h: height of the rectangle
169  *****************************************************************************************
170  */
171 void hal_gfx_raster_rect_fx(int x, int y, int w, int h);
172 
173 /**
174  *****************************************************************************************
175  * @brief Raster a rectangle. (float coordinates)
176  *
177  * @param[in] x: x coordinate of the upper left vertex of the rectangle
178  * @param[in] y: y coordinate of the upper left vertex of the rectangle
179  * @param[in] w: width of the rectangle
180  * @param[in] h: height of the rectangle
181  *****************************************************************************************
182  */
183 void hal_gfx_raster_rect_f(float x, float y, float w, float h);
184 
185 /**
186  *****************************************************************************************
187  * @brief Raster a triangle. (float coordinates)
188  *
189  * @param[in] x0: x coordinate at the first vertex of the triangle
190  * @param[in] y0: y coordinate at the first vertex of the triangle
191  * @param[in] x1: x coordinate at the second vertex of the triangle
192  * @param[in] y1: y coordinate at the second vertex of the triangle
193  * @param[in] x2: x coordinate at the third vertex of the triangle
194  * @param[in] y2: y coordinate at the third vertex of the triangle
195  *****************************************************************************************
196  */
197 void hal_gfx_raster_triangle_f(float x0, float y0, float x1, float y1, float x2, float y2);
198 
199 /**
200  *****************************************************************************************
201  * @brief Raster the first vertex of the triangle strip. (float coordinates)
202  *
203  * @param[in] x0: x coordinate at the first vertex of the triangle
204  * @param[in] y0: y coordinate at the first vertex of the triangle
205  *****************************************************************************************
206  */
207 void hal_gfx_raster_triangle_p0_f(float x0, float y0);
208 
209 /**
210  *****************************************************************************************
211  * @brief Raster the second vertex of the triangle strip. (float coordinates)
212  *
213  * @param[in] x1: x coordinate at the second vertex of the triangle
214  * @param[in] y1: y coordinate at the second vertex of the triangle
215  *****************************************************************************************
216  */
217 void hal_gfx_raster_triangle_p1_f(float x1, float y1);
218 
219 /**
220  *****************************************************************************************
221  * @brief Raster the third vertex of the triangle strip. (float coordinates)
222  *
223  * @param[in] x2: x coordinate at the third vertex of the triangle
224  * @param[in] y2: y coordinate at the third vertex of the triangle
225  *****************************************************************************************
226  */
227 void hal_gfx_raster_triangle_p2_f(float x2, float y2);
228 
229 /**
230  *****************************************************************************************
231  * @brief Raster a quad. (float coordinates)
232  *
233  * @param[in] x0: x coordinate at the first vertex of the quadrilateral
234  * @param[in] y0: y coordinate at the first vertex of the quadrilateral
235  * @param[in] x1: x coordinate at the second vertex of the quadrilateral
236  * @param[in] y1: y coordinate at the second vertex of the quadrilateral
237  * @param[in] x2: x coordinate at the third vertex of the quadrilateral
238  * @param[in] y2: y coordinate at the third vertex of the quadrilateral
239  * @param[in] x3: x coordinate at the fourth vertex of the quadrilateral
240  * @param[in] y3: y coordinate at the fourth vertex of the quadrilateral
241  *****************************************************************************************
242  */
243 void hal_gfx_raster_quad_f(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3);
244 /** @} */
245 #ifdef __cplusplus
246 }
247 #endif
248 
249 #endif
250 /** @} */
251 /** @} */
252 
hal_gfx_raster_stroked_circle_aa
void hal_gfx_raster_stroked_circle_aa(float x, float y, float r, float w)
Raster a circle with Anti-Aliasing (if available) and specified width.
hal_gfx_raster_triangle_p0_f
void hal_gfx_raster_triangle_p0_f(float x0, float y0)
Raster the first vertex of the triangle strip. (float coordinates)
hal_gfx_raster_quad
void hal_gfx_raster_quad(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
Raster a quad.
hal_gfx_raster_rect
void hal_gfx_raster_rect(int x, int y, int w, int h)
Raster a rectangle.
hal_gfx_raster_triangle_p1_f
void hal_gfx_raster_triangle_p1_f(float x1, float y1)
Raster the second vertex of the triangle strip. (float coordinates)
hal_gfx_raster_line
void hal_gfx_raster_line(int x0, int y0, int x1, int y1)
Raster a line.
hal_gfx_raster_rounded_rect
void hal_gfx_raster_rounded_rect(int x0, int y0, int w, int h, int r)
Raster a rectangle with rounded edges.
hal_gfx_raster_quad_f
void hal_gfx_raster_quad_f(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)
Raster a quad. (float coordinates)
hal_gfx_raster_triangle_fx
void hal_gfx_raster_triangle_fx(int x0fx, int y0fx, int x1fx, int y1fx, int x2fx, int y2fx)
Raster a triangle with fixed point(16.16)
hal_gfx_raster_pixel
void hal_gfx_raster_pixel(int x, int y)
Raster a pixel.
hal_gfx_raster_rect_f
void hal_gfx_raster_rect_f(float x, float y, float w, float h)
Raster a rectangle. (float coordinates)
hal_gfx_set_raster_color
void hal_gfx_set_raster_color(uint32_t rgba8888)
Setting the raster color.
hal_gfx_raster_triangle_p2_f
void hal_gfx_raster_triangle_p2_f(float x2, float y2)
Raster the third vertex of the triangle strip. (float coordinates)
hal_gfx_raster_rect_fx
void hal_gfx_raster_rect_fx(int x, int y, int w, int h)
Raster a rectangle with fixed point(16.16)
hal_gfx_raster_quad_fx
void hal_gfx_raster_quad_fx(int x0fx, int y0fx, int x1fx, int y1fx, int x2fx, int y2fx, int x3fx, int y3fx)
Raster a quad with fixed point(16.16)
hal_gfx_raster_circle_aa
void hal_gfx_raster_circle_aa(float x, float y, float r)
Raster a circle with Anti-Aliasing (if available)
hal_gfx_raster_triangle_f
void hal_gfx_raster_triangle_f(float x0, float y0, float x1, float y1, float x2, float y2)
Raster a triangle. (float coordinates)
hal_gfx_raster_triangle
void hal_gfx_raster_triangle(int x0, int y0, int x1, int y1, int x2, int y2)
Raster a triangle.