GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_hline.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later
2/*
3 * Copyright (C) 2009-2011 Jiri "BlueBear" Dluhos
4 * <jiri.bluebear.dluhos@gmail.com>
5 *
6 * Copyright (C) 2009-2024 Cyril Hrubis <metan@ucw.cz>
7 */
8
13#ifndef GFX_GP_HLINE_H
14#define GFX_GP_HLINE_H
15
16#include <core/gp_types.h>
17#include <gfx/gp_hline.gen.h>
18
30 gp_pixel pixel);
31
32void gp_hline_xxy_raw(gp_pixmap *pixmap, gp_coord x0, gp_coord x1,
33 gp_coord y, gp_pixel pixel);
34
46 gp_pixel pixel);
47
48void gp_hline_xyw_raw(gp_pixmap *pixmap, gp_coord x, gp_coord y, gp_size w,
49 gp_pixel pixel);
50
51/* default argument set is xxy */
52static inline void gp_hline_raw(gp_pixmap *pixmap, gp_coord x0, gp_coord x1,
53 gp_coord y, gp_pixel p)
54{
55 gp_hline_xxy_raw(pixmap, x0, x1, y, p);
56}
57
64static inline void gp_hline(gp_pixmap *pixmap, gp_coord x0, gp_coord x1,
65 gp_coord y, gp_pixel p)
66{
67 gp_hline_xxy(pixmap, x0, x1, y, p);
68}
69
70#endif /* GFX_GP_HLINE_H */
A common types.
uint32_t gp_pixel
Pixel integer value.
Definition gp_types.h:33
int gp_coord
Integer type for coordinates i.e. x, y, ...
Definition gp_types.h:19
unsigned int gp_size
Integer type for sizes i.e. w, h, ...
Definition gp_types.h:24
void gp_hline_xxy(gp_pixmap *pixmap, gp_coord x0, gp_coord x1, gp_coord y, gp_pixel pixel)
Horizontal line drawing algorithm.
void gp_hline_xyw(gp_pixmap *pixmap, gp_coord x, gp_coord y, gp_size w, gp_pixel pixel)
Horizontal line drawing algorithm.
static void gp_hline(gp_pixmap *pixmap, gp_coord x0, gp_coord x1, gp_coord y, gp_pixel p)
Horizontal line drawing algorithm.
Definition gp_hline.h:64
A pixmap buffer.
Definition gp_pixmap.h:33