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
nerrons
purr-data
Commits
f7001aa0
Commit
f7001aa0
authored
Aug 30, 2014
by
Ivica Bukvic
Browse files
*increased area around garray points to make them more easy to click onto (needs further testing)
parent
40a96156
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/g_array.c
View file @
f7001aa0
...
...
@@ -871,6 +871,16 @@ void array_getcoordinate(t_glist *glist,
*
xp2
=
glist_xtopixels
(
glist
,
basex
+
fielddesc_cvttocoord
(
xfielddesc
,
xval
+
1
))
-
1
;
*
yp
=
ypix
;
// increased following on 20140830 to 8 (+4 and -4) and
// so that the smallest hitbox is always at least 8x8
// check with all_about_arrays.pd inside custom scalars
// in an array
if
(
*
xp1
==
*
xp2
)
{
*
xp1
=
*
xp1
-
4
;
*
xp2
=
*
xp2
+
4
;
wpix
=
8
;
}
*
wp
=
wpix
;
}
...
...
@@ -1078,8 +1088,11 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
xonset
,
yonset
,
wonset
,
i
,
xloc
,
yloc
,
xinc
,
xfield
,
yfield
,
wfield
,
&
pxpix1
,
&
pxpix2
,
&
pypix
,
&
pwpix
);
//fprintf(stderr," array_getcoordinate %d: pxpix1:%f pxpix2:%f pypix:%f pwpix:%f dx:%f dy:%f elemsize:%d yonset:%d wonset:%d xonset:%d xloc:%f yloc:%f xinc:%f\n", i, pxpix1, pxpix2, pypix, pwpix, dx, dy, elemsize, yonset, wonset, xonset, xloc, yloc, xinc);
if
(
pwpix
<
4
)
pwpix
=
4
;
// increased following on 20140830 to 8 and updated array_getcoordinate
// so that the smallest hitbox is always at least 8x8--check with
// all_about_arrays.pd inside custom scalars in an array
if
(
pwpix
<
8
)
pwpix
=
8
;
if
(
xpix
>=
(
int
)
pxpix1
&&
xpix
<=
(
int
)
pxpix2
&&
((
array_joc
)
||
(
ypix
>=
pypix
-
pwpix
&&
ypix
<=
pypix
+
pwpix
)))
...
...
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