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
Wynn
purr-data
Commits
c0adb9d9
Commit
c0adb9d9
authored
Aug 07, 2014
by
Mathieu L Bouchard
Browse files
fixed bug in gop move-handle introduced by one of my last commits
parent
9bf986c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/g_canvas.c
View file @
c0adb9d9
...
...
@@ -2018,7 +2018,6 @@ void canvasgop__motionhook(t_scalehandle *sh,t_floatarg f1, t_floatarg f2)
{
t_canvas
*
x
=
(
t_canvas
*
)(
sh
->
h_master
);
int
dx
=
(
int
)
f1
,
dy
=
(
int
)
f2
;
int
newx
,
newy
;
if
(
sh
->
h_dragon
)
{
...
...
@@ -2037,8 +2036,8 @@ void canvasgop__motionhook(t_scalehandle *sh,t_floatarg f1, t_floatarg f2)
sx = maxi(sx,x2-x1);
sy = maxi(sy,y2-y1);
}*/
// does not work, needs a gobj_getrect that does not use pixwidth & pixheight
newx
=
x
->
gl_xmargin
+
sx
;
newy
=
x
->
gl_ymargin
+
sy
;
int
newx
=
x
->
gl_xmargin
+
sx
;
int
newy
=
x
->
gl_ymargin
+
sy
;
sys_vgui
(
".x%x.c coords %s %d %d %d %d
\n
"
,
x
,
sh
->
h_outlinetag
,
x
->
gl_xmargin
,
x
->
gl_ymargin
,
newx
,
newy
);
...
...
@@ -2065,13 +2064,10 @@ void canvasgop__motionhook(t_scalehandle *sh,t_floatarg f1, t_floatarg f2)
properties_set_field_int
(
properties
,
"n.canvasdialog.y.f2.entry4"
,
x
->
gl_ymargin
+
dy
);
}
int
x1
=
x
->
gl_xmargin
+
dx
,
x2
=
x1
+
x
->
gl_pixwidth
;
int
y1
=
x
->
gl_ymargin
+
dy
,
y2
=
y1
+
x
->
gl_pixheight
;
sys_vgui
(
".x%x.c coords GOP %d %d %d %d %d %d %d %d %d %d
\n
"
,
x
,
newx
,
newy
,
newx
+
x
->
gl_pixwidth
,
newy
,
newx
+
x
->
gl_pixwidth
,
newy
+
x
->
gl_pixheight
,
newx
,
newy
+
x
->
gl_pixheight
,
newx
,
newy
);
x
,
x1
,
y1
,
x2
,
y1
,
x2
,
y2
,
x1
,
y2
,
x1
,
y1
);
sh
->
h_dragx
=
dx
;
sh
->
h_dragy
=
dy
;
}
...
...
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