Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jonathan Wilkes
purr-data
Commits
cd92b517
Commit
cd92b517
authored
Dec 13, 2015
by
Jonathan Wilkes
Browse files
align scalar selection rectangle to pixel grid
parent
cc5dbd2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
pd/nw/pdgui.js
View file @
cd92b517
...
...
@@ -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
,
});
...
...
pd/src/g_scalar.c
View file @
cd92b517
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment