1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

wrlib: add a function to draw rectangles

it appears that such kind of function was missing from the lib
This commit is contained in:
David Maciejak
2014-05-10 19:26:47 +08:00
committed by Carlos R. Mafra
parent b764a766bf
commit 8708b62cea
3 changed files with 12 additions and 0 deletions

View File

@@ -463,6 +463,15 @@ void ROperateLines(RImage * image, int operation, const RPoint * points, int npo
genericLine(image, x1, y1, x2, y2, color, operation, i);
}
void ROperateRectangle(RImage *image, int operation, int x0, int y0, int x1, int y1, const RColor *color)
{
int y;
for (y = y0; y <= y1; y++) {
genericLine(image, x0, y, x1, y, color, operation, False);
}
}
void RDrawSegments(RImage * image, const RSegment * segs, int nsegs, const RColor * color)
{
register int i;

View File

@@ -60,6 +60,7 @@ LIBWRASTER3
ROperateLines;
ROperatePixel;
ROperatePixels;
ROperateRectangle;
ROperateSegments;
RPutPixel;
RPutPixels;

View File

@@ -403,6 +403,8 @@ void RDrawLines(RImage *image, const RPoint *points, int npoints, int mode,
void ROperateLines(RImage *image, int operation, const RPoint *points, int npoints,
int mode, const RColor *color);
void ROperateRectangle(RImage *image, int operation, int x0, int y0, int x1, int y1, const RColor *color);
void RDrawSegments(RImage *image, const RSegment *segs, int nsegs, const RColor *color);
void ROperateSegments(RImage *image, int operation, const RSegment *segs, int nsegs,