Commit cd92b517 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

align scalar selection rectangle to pixel grid

parent cc5dbd2e
......@@ -2359,8 +2359,8 @@ function gui_scalar_draw_select_rect(cid, tag, state, x1, y1, x2, y2, basex, bas
var g = get_gobj(cid, tag),
b = g.querySelector(".border");
configure_item(b, {
x: (x1 - basex),
y: (y1 - basey),
x: (x1 - basex) + 0.5,
y: (y1 - basey) + 0.5,
width: x2 - x1,
height: y2 - y1,
});
......
......@@ -554,10 +554,10 @@ void scalar_drawselectrect(t_scalar *x, t_glist *glist, int state)
gui_vmess("gui_scalar_draw_select_rect", "xsiiiiiff",
glist_getcanvas(glist), tagbuf,
state,
(int)(x1 / xscale + 0.499),
(int)(y1 / yscale + 0.499),
(int)(x2 / xscale + 0.499),
(int)(y2 / yscale + 0.499),
(int)(x1 / xscale),
(int)(y1 / yscale),
(int)(x2 / xscale),
(int)(y2 / yscale),
basex,
basey);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment