Documentation de la bibliothèque MLV-2.0.2

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 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 
111  const int* vx, const int* vy, int nb_points, MLV_Color color
112 );
113 
124  const int* vx, const int* vy, int nb_points, MLV_Color color
125 );
126 
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 
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 
227  int x, int y, int radius, MLV_Color color, MLV_Image* image
228 );
229 
241  int x, int y, int radius, MLV_Color color, MLV_Image* image
242 );
243 
255  int x, int y, int radius_x, int radius_y, MLV_Color color, MLV_Image* image
256 );
257 
269  int x, int y, int radius_x, int radius_y, MLV_Color color, MLV_Image* image
270 );
271 
282  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
283 );
284 
296  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
297 );
298 
311  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
312 );
313 
325  const int* vx, const int* vy, int nb_points, MLV_Color color, MLV_Image* image
326 );
327 
340  int x, int y, int width, int height, MLV_Color color, MLV_Image* image
341 );
342 
355  int x, int y, int width, int height, MLV_Color color, MLV_Image* image
356 );
357 
370  int x, int y, int width, int height, MLV_Color color, MLV_Image* image
371 );
372 
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
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_polygon(const int *vx, const int *vy, int nb_points, MLV_Color color)
Dessine un polygone à partir d'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ée...
Ce fichier définit tous les prototypes concernant les fonctions permettant d'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ée...
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 à MLV_...
void MLV_draw_filled_polygon(const int *vx, const int *vy, int nb_points, MLV_Color color)
Dessine un polygone plein à partir d'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'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'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 à MLV_...
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_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'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_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 p...
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 p...
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'une liste de sommets dans une image.