mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-09 10:05:49 +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:
committed by
Carlos R. Mafra
parent
b764a766bf
commit
8708b62cea
@@ -463,6 +463,15 @@ void ROperateLines(RImage * image, int operation, const RPoint * points, int npo
|
|||||||
genericLine(image, x1, y1, x2, y2, color, operation, i);
|
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)
|
void RDrawSegments(RImage * image, const RSegment * segs, int nsegs, const RColor * color)
|
||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ LIBWRASTER3
|
|||||||
ROperateLines;
|
ROperateLines;
|
||||||
ROperatePixel;
|
ROperatePixel;
|
||||||
ROperatePixels;
|
ROperatePixels;
|
||||||
|
ROperateRectangle;
|
||||||
ROperateSegments;
|
ROperateSegments;
|
||||||
RPutPixel;
|
RPutPixel;
|
||||||
RPutPixels;
|
RPutPixels;
|
||||||
|
|||||||
@@ -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,
|
void ROperateLines(RImage *image, int operation, const RPoint *points, int npoints,
|
||||||
int mode, const RColor *color);
|
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 RDrawSegments(RImage *image, const RSegment *segs, int nsegs, const RColor *color);
|
||||||
|
|
||||||
void ROperateSegments(RImage *image, int operation, const RSegment *segs, int nsegs,
|
void ROperateSegments(RImage *image, int operation, const RSegment *segs, int nsegs,
|
||||||
|
|||||||
Reference in New Issue
Block a user