filters/gp_filter_resize_alloc: Check w and h
[gfxprim.git] / libs / gfx / GP_VLine.gen.c.t
blobb17290b25955332bebe6b818db16494519c252c7
1 @ include source.t
2 /*
3  * Vertical Line drawing algorithm.
4  *
5  * Copyright (C) 2009-2014 Cyril Hrubis <metan@ucw.cz>
6  */
8 #include "core/GP_GetPutPixel.h"
9 #include "gfx/GP_VLine.gen.h"
11 @ for ps in pixelsizes:
12 void gp_vline_raw_{{ ps.suffix }}(gp_pixmap *pixmap, gp_coord x,
13                         gp_coord y0, gp_coord y1, gp_pixel pixel)
15         int y;
17         for (y = y0; y <= y1; y++)
18                 gp_putpixel_raw_{{ ps.suffix }}(pixmap, x, y, pixel);