Documentation de la bibliothèque MLV-3.1.0

MLV_shape.h
Aller à la documentation de ce fichier.
1 /*
2  * This file is part of the MLV Library.
3  *
4  * Copyright (C) 2010,2011,2012,2016 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 
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 
113 void MLV_draw_triangle(
114  int ax, int ay, int bx, int by, int cx, int cy, MLV_Color color
115 );
116 
126  const int* vx, const int* vy, int nb_points, MLV_Color color
127 );
128 
141  int ax, int ay, int bx, int by, int cx, int cy, MLV_Color color
142 );
143 
144 
155  const int* vx, const int* vy, int nb_points, MLV_Color color
156 );
157 
167  const int* vx, const int* vy, int nb_points, MLV_Color color
168 );
169 
180 void MLV_draw_rectangle(int x, int y, int width, int height, MLV_Color color);
181 
192 void MLV_draw_rectangle(int x, int y, int width, int height, MLV_Color color);
193 
205  int x, int y, int width, int height, MLV_Color color
206 );
207 
217 void MLV_draw_line(int x1, int y1, int x2, int y2, MLV_Color color);
218 
226 void MLV_draw_pixel(int x, int y, MLV_Color color);
227 
236 void MLV_draw_point(int x, int y, MLV_Color color);
237 
238 
239 
240 
241 
242 
244 // Drawing operation on images //
246 
258  int x, int y, int radius, MLV_Color color, MLV_Image* image
259 );
260 
272  int x, int y, int radius, MLV_Color color, MLV_Image* image
273 );
274 
286  int x, int y, int radius_x, int radius_y, MLV_Color color, MLV_Image* image
287 );
288 
300  int x, int y, int radius_x, int radius_y, MLV_Color color, MLV_Image* image
301 );
302 
313  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
314 );
315 
329  int ax, int ay, int bx, int by, int cx, int cy, MLV_Color color,
330  MLV_Image* image
331 );
332 
344  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
345 );
346 
360  int ax, int ay, int bx, int by, int cx, int cy, MLV_Color color,
361  MLV_Image* image
362 );
363 
376  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
377 );
378 
390  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
391 );
392 
405  int x, int y, int width, int height, MLV_Color color, MLV_Image* image
406 );
407 
420  int x, int y, int width, int height, MLV_Color color, MLV_Image* image
421 );
422 
435  int x, int y, int width, int height, MLV_Color color, MLV_Image* image
436 );
437 
449  int x1, int y1, int x2, int y2, MLV_Color color, MLV_Image* image
450 );
451 
461 void MLV_draw_pixel_on_image(int x, int y, MLV_Color color, MLV_Image* image);
462 
472 void MLV_draw_point_on_image(int x, int y, MLV_Color color, MLV_Image* image);
473 
474 
475 #ifdef __cplusplus
476 }
477 #endif
478 
479 #endif
void MLV_draw_filled_ellipse(int x, int y, int radius_x, int radius_y, MLV_Color color)
Dessine une ellipse pleine.
void MLV_draw_filled_ellipse_on_image(int x, int y, int radius_x, int radius_y, MLV_Color color, MLV_Image *image)
Dessine une ellipse pleine dans une image.
void MLV_draw_circle_on_image(int x, int y, int radius, MLV_Color color, MLV_Image *image)
Dessine un cercle à une position et un rayon spécifiés en paramètres dans une image...
void MLV_draw_filled_triangle_on_image(int ax, int ay, int bx, int by, int cx, int cy, MLV_Color color, MLV_Image *image)
Dessine un triangle plein sur une image passée en paramètre.
void MLV_draw_polygon(const int *vx, const int *vy, int nb_points, MLV_Color color)
Dessine un polygone à partir d&#39;une liste de sommets.
void MLV_draw_ellipse(int x, int y, int radius_x, int radius_y, MLV_Color color)
Dessine une ellipse.
void MLV_draw_filled_rectangle_on_image(int x, int y, int width, int height, MLV_Color color, MLV_Image *image)
Dessine un rectangle plein dont la taille, la couleur et la position du sommet Nord-Ouest sont donné...
Ce fichier définit tous les prototypes concernant les fonctions permettant d&#39;insérer des images...
Définit toutes les couleurs disponibles dans la bibliothèque MLV.
void MLV_draw_filled_rectangle(int x, int y, int width, int height, MLV_Color color)
Dessine un rectangle plein dont la taille, la couleur et la position du sommet Nord-Ouest sont donné...
void MLV_draw_point(int x, int y, MLV_Color color)
Dessine un point dont les coordonnées sont passées en paramètres. Cette fonction est identique à ...
void MLV_draw_filled_polygon(const int *vx, const int *vy, int nb_points, MLV_Color color)
Dessine un polygone plein à partir d&#39;une liste de sommets.
void MLV_draw_circle(int x, int y, int radius, MLV_Color color)
Dessine un cercle à une position et un rayon spécifiés en paramètres.
void MLV_draw_pixel(int x, int y, MLV_Color color)
Dessine un pixel dont les coordonnées sont passées en paramètres.
struct _MLV_Image MLV_Image
Définit le type Image dans la bibliothèque MLV.
Definition: MLV_image.h:53
void MLV_draw_line_on_image(int x1, int y1, int x2, int y2, MLV_Color color, MLV_Image *image)
Dessine une ligne dans une image.
Uint32 MLV_Color
Définit un type couleur pour la bibliothèque MLV.
Definition: MLV_color.h:54
void MLV_draw_bezier_curve(const int *vx, const int *vy, int nb_points, MLV_Color color)
Dessine une courbe de Bézier à partir d&#39;une liste de sommets.
void MLV_draw_bezier_curve_on_image(const int *vx, const int *vy, int nb_points, MLV_Color color, MLV_Image *image)
Dessine une courbe de Bézier à partir d&#39;une liste de sommets dans une image.
void MLV_draw_point_on_image(int x, int y, MLV_Color color, MLV_Image *image)
Dessine un point dont les coordonnées sont passées en paramètres. Cette fonction est identique à ...
void MLV_draw_filled_circle(int x, int y, int radius, MLV_Color color)
Dessine un disque plein dont le centre et le rayon sont passés en paramètres.
void MLV_draw_triangle_on_image(int ax, int ay, int bx, int by, int cx, int cy, MLV_Color color, MLV_Image *image)
Dessine un triangle (vide) sur une image passée en paramètre.
void MLV_draw_filled_polygon_on_image(const int *vx, const int *vy, int nb_points, MLV_Color color, MLV_Image *image)
Dessine un polygone plein à partir d&#39;une liste de sommets dans une image.
void MLV_draw_ellipse_on_image(int x, int y, int radius_x, int radius_y, MLV_Color color, MLV_Image *image)
Dessine une ellipse dans une image.
void MLV_draw_triangle(int ax, int ay, int bx, int by, int cx, int cy, MLV_Color color)
Dessine un triangle (vide).
void MLV_draw_rectangle(int x, int y, int width, int height, MLV_Color color)
Dessine un rectangle dont la taille, la couleur et la position du sommet Nord-Ouest sont données en ...
void MLV_draw_filled_triangle(int ax, int ay, int bx, int by, int cx, int cy, MLV_Color color)
Dessine un triangle plein.
void MLV_draw_pixel_on_image(int x, int y, MLV_Color color, MLV_Image *image)
Dessine un pixel dont les coordonnées sont passées en paramètres dans une image.
void MLV_draw_line(int x1, int y1, int x2, int y2, MLV_Color color)
Dessine une ligne.
void MLV_draw_rectangle_on_image(int x, int y, int width, int height, MLV_Color color, MLV_Image *image)
Dessine un rectangle dont la taille, la couleur et la position du sommet Nord-Ouest sont données en ...
void MLV_draw_filled_circle_on_image(int x, int y, int radius, MLV_Color color, MLV_Image *image)
Dessine un disque plein dont le centre et le rayon sont passés en parametres dans une image...
void MLV_draw_polygon_on_image(const int *vx, const int *vy, int nb_points, MLV_Color color, MLV_Image *image)
Dessine un polygone à partir d&#39;une liste de sommets dans une image.