fdf/src/draw/put_pixel.c
2024-12-20 16:33:25 +01:00

22 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: o_ :::::: ::: */
/* put_pixel.c :+: / :+::+: :+: */
/* +:+ > +:++:+ +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#++#++:++#++ */
/* +#+ +#+#+ +#++#+ +#+ \o/ */
/* Created: 2024/12/20 11:21:26 by whaffman #+#+# #+#+# #+# #+# | */
/* Updated: 2024/12/20 11:21:26 by whaffman ### ### ### ### / \ */
/* */
/* ************************************************************************** */
#include "fdf.h"
void put_pixel(t_fdf *fdf, t_point_2d point)
{
if (point.x < 0 || point.x >= (int) fdf->img->width
|| point.y < 0 || point.y >= (int) fdf->img->height)
return ;
mlx_put_pixel(fdf->img, point.x, point.y, point.color);
}