tgrekov-fdf
HIVE fdf May 2024
Loading...
Searching...
No Matches
draw_line.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* draw_line.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/13 06:17:39 by tgrekov #+# #+# */
/* Updated: 2024/06/24 06:00:19 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file draw_line.c.

#include <MLX42.h>
#include "../utils/utils.h"
Include dependency graph for draw_line.c:

Go to the source code of this file.

Functions

void draw_line (mlx_image_t *img, int x1, int y1, int *p2)
 Multi-directional implementation of the Bresenham incremental error line drawing algorithm.
 

Function Documentation

◆ draw_line()

void draw_line ( mlx_image_t img,
int  x1,
int  y1,
int *  p2 
)

Multi-directional implementation of the Bresenham incremental error line drawing algorithm.

Parameters
imgMlx image pointer
x1Starting x position
y1Starting y position
p2Ending [x, y] position

Definition at line 32 of file draw_line.c.

References abs(), and err().

Here is the call graph for this function:
Here is the caller graph for this function: