Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
7d51676a
Commit
7d51676a
authored
Aug 22, 2014
by
Mathieu L Bouchard
Browse files
fix bug in graph_bounds when graph area is 0. Also don't call redraw when bounds have not changed.
parent
3361da40
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/g_graph.c
View file @
7d51676a
...
...
@@ -596,18 +596,19 @@ void canvas_resortoutlets(t_canvas *x)
static
void
graph_bounds
(
t_glist
*
x
,
t_floatarg
x1
,
t_floatarg
y1
,
t_floatarg
x2
,
t_floatarg
y2
)
{
x
->
gl_x1
=
x1
;
x
->
gl_x2
=
x2
;
x
->
gl_y1
=
y1
;
x
->
gl_y2
=
y2
;
if
(
x
->
gl_x2
==
x
->
gl_x1
||
x
->
gl_y2
==
x
->
gl_y1
)
{
if
(
x1
==
x2
||
y1
==
y2
)
{
error
(
"graph: empty bounds rectangle"
);
x1
=
y1
=
0
;
x2
=
y2
=
1
;
}
glist_redraw
(
x
);
if
(
x
->
gl_x1
!=
x1
||
x
->
gl_y1
!=
y1
||
x
->
gl_x2
!=
x2
||
x
->
gl_y2
!=
y2
)
{
printf
(
"%f %f %f %f %f %f %f %f
\n
"
,
x
->
gl_x1
,
x1
,
x
->
gl_y1
,
y1
,
x
->
gl_x2
,
x2
,
x
->
gl_y2
,
y2
);
x
->
gl_x1
=
x1
;
x
->
gl_x2
=
x2
;
x
->
gl_y1
=
y1
;
x
->
gl_y2
=
y2
;
glist_redraw
(
x
);
}
}
static
void
graph_xticks
(
t_glist
*
x
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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