Cub3D
 
Loading...
Searching...
No Matches
ft_draw_img.c File Reference
#include "data_structure.h"
#include "ft_draw.h"
#include "libft.h"
Include dependency graph for ft_draw_img.c:

Functions

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 behavior if used on images with other bit depths. it's because of alignment issues with the pixel data.
 
void ft_put_pixel_to_img_24bp (t_img *img, int x, int y, int color)
 Special case for 24 bits per pixel images.
 
void ft_put_circle_to_img (t_mlx *mlx, void *win_ptr, t_img *img, t_circle element)
 Put a circle to the image.
 

Function Documentation

◆ ft_put_circle_to_img()

void ft_put_circle_to_img ( t_mlx * mlx,
void * win_ptr,
t_img * img,
t_circle element )

Put a circle to the image.

Parameters
[in,out]mlxmlx structure
[in,out]win_ptrwindow pointer
[in,out]imgimg structure
[in]elementcircle element to draw
Here is the call graph for this function:

◆ ft_put_pixel_to_img()

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 behavior if used on images with other bit depths. it's because of alignment issues with the pixel data.

Parameters
[in,out]imgimage structure
[in]xx axis
[in]yy axis
[in]colorcolor

◆ ft_put_pixel_to_img_24bp()

void ft_put_pixel_to_img_24bp ( t_img * img,
int x,
int y,
int color )

Special case for 24 bits per pixel images.

Parameters
[in,out]imgimage structure
[in]xx axis
[in]yy axis
[in]colorcolor