Small bug with filled rounded rectangles


when drawing a filled rounded rectangle the diagdkrenderer shows 3
small leaks in the filling of such a rounded rectangle. The bug is due
to this line in lib/diagdkrenderer.c/draw_fill_arc

               gc, fill,
               left, top, right-left+(fill?1:0), bottom-top+(fill?1:0),
               (int) (angle1*64.0), (int) (dangle*64.0));

this function is called with fill=TRUE in fill_rounded_rect. Adding 1
to x and y coordinates explains the 3 leaks in the filling.
IMHO it does not makes sense to add 1 if arc is to be filled. Therefore
I would suggest to change it into

               gc, fill,
               left, top, right-left, bottom-top,
               (int) (angle1*64.0), (int) (dangle*64.0));

This is only directly in dia (i.e., diagdkrenderer) and not in any

BTW, isn't it the right way to post patches to this list ? Should I
post them anywhere else ? I would be glad to hear from you.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]