r5699 - trunk/eda/fped
werner at docs.openmoko.org
werner at docs.openmoko.org
Wed Oct 21 17:04:57 CEST 2009
Author: werner
Date: 2009-10-21 17:04:56 +0200 (Wed, 21 Oct 2009)
New Revision: 5699
Modified:
trunk/eda/fped/gui_inst.c
Log:
- gui_inst.c (gui_draw_rpad): when drawing an outline instead of filling, use
two lines instead of a rectangle
Modified: trunk/eda/fped/gui_inst.c
===================================================================
--- trunk/eda/fped/gui_inst.c 2009-10-20 23:50:45 UTC (rev 5698)
+++ trunk/eda/fped/gui_inst.c 2009-10-21 15:04:56 UTC (rev 5699)
@@ -303,12 +303,24 @@
if (h > w) {
r = w/2;
draw_arc(DA, gc, fill, min.x+r, max.y-r, r, 180, 0);
- gdk_draw_rectangle(DA, gc, fill, min.x, min.y+r, w, h-2*r);
+ if (fill)
+ gdk_draw_rectangle(DA, gc, fill,
+ min.x, min.y+r, w, h-2*r);
+ else {
+ gdk_draw_line(DA, gc, min.x, min.y+r, min.x, max.y-r);
+ gdk_draw_line(DA, gc, max.x, min.y+r, max.x, max.y-r);
+ }
draw_arc(DA, gc, fill, min.x+r, min.y+r, r, 0, 180);
} else {
r = h/2;
draw_arc(DA, gc, fill, min.x+r, min.y+r, r, 90, 270);
- gdk_draw_rectangle(DA, gc, fill, min.x+r, min.y, w-2*r, h);
+ if (fill)
+ gdk_draw_rectangle(DA, gc, fill,
+ min.x+r, min.y, w-2*r, h);
+ else {
+ gdk_draw_line(DA, gc, min.x+r, min.y, max.x-r, min.y);
+ gdk_draw_line(DA, gc, min.x+r, max.y, max.x-r, max.y);
+ }
draw_arc(DA, gc, fill, max.x-r, min.y+r, r, 270, 90);
}
More information about the commitlog
mailing list