Documentation of the MLV-2.0.2 library

MLV_shape.h
1 /*
2  * This file is part of the MLV Library.
3  *
4  * Copyright (C) 2010,2011,2012 Adrien Boussicault, Marc Zipstein
5  *
6  *
7  * This Library is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This Library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this Library. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
33 #ifndef __MLV__MLV_FIGURES_H__
34 #define __MLV__MLV_FIGURES_H__
35 
36 #include "MLV_color.h"
37 #include "MLV_image.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
51 void MLV_draw_circle(int x, int y, int radius, MLV_Color color);
52 
62 void MLV_draw_filled_circle(int x, int y, int radius, MLV_Color color);
63 
73 void MLV_draw_ellipse(
74  int x, int y, int radius_x, int radius_y, MLV_Color color
75 );
76 
86 void MLV_draw_filled_ellipse(
87  int x, int y, int radius_x, int radius_y, MLV_Color color
88 );
89 
98 void MLV_draw_polygon(
99  const int* vx, const int* vy, int nb_points, MLV_Color color
100 );
101 
110 void MLV_draw_filled_polygon(
111  const int* vx, const int* vy, int nb_points, MLV_Color color
112 );
113 
123 void MLV_draw_bezier_curve(
124  const int* vx, const int* vy, int nb_points, MLV_Color color
125 );
126 
135 void MLV_draw_filled_polygon(
136  const int* vx, const int* vy, int nb_points, MLV_Color color
137 );
138 
149 void MLV_draw_rectangle(int x, int y, int width, int height, MLV_Color color);
150 
161 void MLV_draw_rectangle(int x, int y, int width, int height, MLV_Color color);
162 
173 void MLV_draw_filled_rectangle(
174  int x, int y, int width, int height, MLV_Color color
175 );
176 
186 void MLV_draw_line(int x1, int y1, int x2, int y2, MLV_Color color);
187 
195 void MLV_draw_pixel(int x, int y, MLV_Color color);
196 
205 void MLV_draw_point(int x, int y, MLV_Color color);
206 
207 
208 
209 
210 
211 
213 // Drawing operation on images //
215 
226 void MLV_draw_circle_on_image(
227  int x, int y, int radius, MLV_Color color, MLV_Image* image
228 );
229 
240 void MLV_draw_filled_circle_on_image(
241  int x, int y, int radius, MLV_Color color, MLV_Image* image
242 );
243 
254 void MLV_draw_ellipse_on_image(
255  int x, int y, int radius_x, int radius_y, MLV_Color color, MLV_Image* image
256 );
257 
268 void MLV_draw_filled_ellipse_on_image(
269  int x, int y, int radius_x, int radius_y, MLV_Color color, MLV_Image* image
270 );
271 
281 void MLV_draw_polygon_on_image(
282  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
283 );
284 
295 void MLV_draw_filled_polygon_on_image(
296  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
297 );
298 
310 void MLV_draw_bezier_curve_on_image(
311  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
312 );
313 
324 void MLV_draw_filled_polygon_on_image(
325  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
326 );
327 
339 void MLV_draw_rectangle_on_image(
340  int x, int y, int width, int height, MLV_Color color, MLV_Image* image
341 );
342 
354 void MLV_draw_rectangle_on_image(
355  int x, int y, int width, int height, MLV_Color color, MLV_Image* image
356 );
357 
369 void MLV_draw_filled_rectangle_on_image(
370  int x, int y, int width, int height, MLV_Color color, MLV_Image* image
371 );
372 
383 void MLV_draw_line_on_image(
384  int x1, int y1, int x2, int y2, MLV_Color color, MLV_Image* image
385 );
386 
396 void MLV_draw_pixel_on_image(int x, int y, MLV_Color color, MLV_Image* image);
397 
407 void MLV_draw_point_on_image(int x, int y, MLV_Color color, MLV_Image* image);
408 
409 
410 #ifdef __cplusplus
411 }
412 #endif
413 
414 #endif