enclosed the updated version On Sat, May 10, 2014 at 8:28 PM, Carlos R. Mafra <crma...@gmail.com> wrote: > On Sat, 10 May 2014 at 19:43:42 +0800, David Maciejak wrote: >> It appears that such kind of function was missing from the lib. >> It will be required for upcoming wmiv image viewer tool. > > I guess it's better to send this patch together with the ones > that require it. > >> diff --git a/wrlib/draw.c b/wrlib/draw.c >> index 350837c..aa8588d 100644 >> --- a/wrlib/draw.c >> +++ b/wrlib/draw.c >> @@ -463,6 +463,13 @@ 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, > > Just a nitpick, "RImage *image" is preferred. > > All instances of such "* stuff" in function arguments in the repository > is my fault when converting the coding style to the linux kernel conventions > with indent a few years ago. 'indent' didn't screw this up when the type > is well-known (e.g. char, int etc), but considered it as a multiplication > otherwise. > > It should be possible to fix this with a script. > >> int x1, int y1, const RColor * color) >> +{ >> + for (int y=y0; y<=y1; y++) { > > But here there's no excuse :-) > It must be "y = y0; y <= 1; > >> diff --git a/wrlib/wraster.h b/wrlib/wraster.h >> index 88f3a72..2003869 100644 >> --- a/wrlib/wraster.h >> +++ b/wrlib/wraster.h >> @@ -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, > > Here you have it "right", so fixing the instance I mentioned above > will lead to a consistent patch :-) > > > -- > To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
0001-wrlib-add-a-function-to-draw-rectangles.patch
Description: Binary data