mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-25 15:54:04 +02:00
- gui_inst.c (gui_draw_rpad): when drawing an outline instead of filling, use
two lines instead of a rectangle git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5699 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
549a15def5
commit
b6e5c6d20a
16
gui_inst.c
16
gui_inst.c
@ -303,12 +303,24 @@ void gui_draw_rpad(struct inst *self)
|
|||||||
if (h > w) {
|
if (h > w) {
|
||||||
r = w/2;
|
r = w/2;
|
||||||
draw_arc(DA, gc, fill, min.x+r, max.y-r, r, 180, 0);
|
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);
|
draw_arc(DA, gc, fill, min.x+r, min.y+r, r, 0, 180);
|
||||||
} else {
|
} else {
|
||||||
r = h/2;
|
r = h/2;
|
||||||
draw_arc(DA, gc, fill, min.x+r, min.y+r, r, 90, 270);
|
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);
|
draw_arc(DA, gc, fill, max.x-r, min.y+r, r, 270, 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user