Cub3D
 
Loading...
Searching...
No Matches
ft_draw.h
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_draw.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: ppontet <ppontet@student.42lyon.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/06/22 18:18:12 by ppontet #+# #+# */
9/* Updated: 2025/08/08 18:09:04 by ppontet ### ########lyon.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef FT_DRAW_H
14# define FT_DRAW_H
15
21
22# include "data_structure.h"
23# include <stdbool.h>
24
25typedef struct s_circle t_circle;
26
31{
32 int x;
33 int y;
34 int radius;
35 int color;
36};
37
48void ft_put_pixel_to_img(t_img *img, int x, int y, int color);
57void ft_put_pixel_to_img_24bp(t_img *img, int x, int y, int color);
67void ft_draw_circle(t_mlx *mlx, void *win_ptr,
68 t_circle element) __attribute__((deprecated));
77void ft_put_circle_to_img(t_mlx *mlx, void *win_ptr, t_img *img,
78 t_circle element);
87void ft_put_circle_to_win(t_mlx *mlx, void *win_ptr, t_circle element,
88 bool is_enabled);
97void ft_put_circle_specific(t_mlx *mlx, void *win_settings_ptr,
98 enum e_screen_size num, bool is_enabled);
106void ft_put_all_circle_to_win(t_mlx *mlx, void *win_settings_ptr,
107 bool is_enabled);
108
109#endif
Header file for all the types and structures of the project.
e_screen_size
Enum used to store the screen size. It is used to set the screen size in the settings....
Definition data_structure.h:52
struct s_img t_img
Definition data_structure.h:26
struct s_mlx t_mlx
Definition data_structure.h:29
void ft_put_circle_to_img(t_mlx *mlx, void *win_ptr, t_img *img, t_circle element)
Put a circle to the image.
Definition ft_draw_img.c:35
void ft_put_pixel_to_img(t_img *img, int x, int y, int color)
Should only be used for images with 32 bits per pixel. (standard) It will result as undefined behavio...
Definition ft_draw_img.c:17
void ft_put_circle_specific(t_mlx *mlx, void *win_settings_ptr, enum e_screen_size num, bool is_enabled)
Function to put the specific case of circles defined by the enum.
Definition ft_settings_draw_img.c:32
void ft_put_circle_to_win(t_mlx *mlx, void *win_ptr, t_circle element, bool is_enabled)
Put ON circle if is_enabled, put OFF circle if not.
Definition ft_settings_draw_img.c:17
void ft_put_pixel_to_img_24bp(t_img *img, int x, int y, int color)
Special case for 24 bits per pixel images.
Definition ft_draw_img.c:25
struct s_circle t_circle
Definition ft_draw.h:25
void ft_draw_circle(t_mlx *mlx, void *win_ptr, t_circle element) __attribute__((deprecated))
Draw a circle directly on the window.
Definition ft_draw_circle.c:18
void ft_put_all_circle_to_win(t_mlx *mlx, void *win_settings_ptr, bool is_enabled)
Function to pull all the circle to the window following their state.
Definition ft_settings_draw_img.c:57
Structure used to store circle informations.
Definition ft_draw.h:31
int y
Definition ft_draw.h:33
int radius
Definition ft_draw.h:34
int x
Definition ft_draw.h:32
int color
Definition ft_draw.h:35