github to gitea
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* image.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: jle-neze <[email protected]> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/09/12 18:19:47 by jle-neze #+# #+# */
|
||||
/* Updated: 2025/09/12 18:19:49 by jle-neze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "cub.h"
|
||||
|
||||
void img_put_pixel(t_img *img, int x, int y, int color)
|
||||
{
|
||||
char *dst;
|
||||
|
||||
if (x < 0 || y < 0 || x >= img->w || y >= img->h)
|
||||
return ;
|
||||
dst = img->addr + (y * img->line_len + x * (img->bpp / 8));
|
||||
*(unsigned int *)dst = (unsigned int)color;
|
||||
}
|
||||
Reference in New Issue
Block a user