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
f4fe5623
Commit
f4fe5623
authored
Nov 12, 2017
by
Jonathan Wilkes
Browse files
Merge branch 'drawarray-fixes' into drawarray-example
parents
8582e3fd
995f77ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
pd/src/g_scalar.c
View file @
f4fe5623
...
...
@@ -785,12 +785,10 @@ static void scalar_group_configure(t_scalar *x, t_glist *owner,
{
t_gobj
*
y
;
char
tagbuf
[
MAXPDSTRING
];
sprintf
(
tagbuf
,
"d
raw
%lx.%lx"
,
(
long
unsigned
int
)
gl
,
sprintf
(
tagbuf
,
"d
group
%lx.%lx"
,
(
long
unsigned
int
)
gl
,
(
long
unsigned
int
)
data
);
char
parentbuf
[
MAXPDSTRING
];
/* check if we're in an array-- really need to see if we can just
get rid of the different tag names for arrays... */
sprintf
(
parentbuf
,
"draw%lx.%lx"
,
sprintf
(
parentbuf
,
"dgroup%lx.%lx"
,
(
long
unsigned
int
)
parent
,
(
long
unsigned
int
)
data
);
gui_start_vmess
(
"gui_draw_configure_all"
,
"xs"
,
...
...
pd/src/g_template.c
View file @
f4fe5623
...
...
@@ -3607,8 +3607,8 @@ static void svg_getrectrect(t_svg *x, t_glist *glist,
t_word *data, t_template *template, t_float basex, t_float basey,
int *xp1, int *yp1, int *xp2, int *yp2)
{
in
t width, height, xoff, yoff;
in
t x1, y1, x2, y2;
t_floa
t width, height, xoff, yoff;
t_floa
t x1, y1, x2, y2;
x1 = y1 = 0x7fffffff;
x2 = y2 = -0x7fffffff;
...
...
@@ -3672,10 +3672,10 @@ static void svg_getrectrect(t_svg *x, t_glist *glist,
*xp2 = *yp2 = -0x7fffffff;
return;
}
*xp1 = x1;
*yp1 = y1;
*xp2 = x2;
*yp2 = y2;
*xp1 =
(int)
x1;
*yp1 =
(int)
y1;
*xp2 =
(int)
x2;
*yp2 =
(int)
y2;
}
void scalar_getinnersvgrect(t_gobj *z, t_glist *owner, t_word *data,
...
...
@@ -6698,8 +6698,9 @@ static void drawarray_getrect(t_gobj *z, t_glist *glist,
If users really want a bbox for this in the future we can just use the
same expensive algorithm as plot_getrect and suggest nesting in an
[draw svg] for performance. But for now I don't think we need that.
*/
[draw svg] for performance. But for now I don't think we need that. */
*xp1 = *yp1 = 0x7fffffff;
*xp2 = *yp2 = -0x7fffffff;
}
static void drawarray_displace(t_gobj *z, t_glist *glist,
...
...
@@ -6892,13 +6893,13 @@ static void drawarray_vis(t_gobj *z, t_glist *glist, t_glist *parentglist,
drawarray_groupvis(sc, glist,
(t_word *)(elem + elemsize * i),
template, (t_glist *)y,
elemtemplatecanvas, usexloc, useyloc,
parent
array);
elemtemplatecanvas, usexloc, useyloc, array);
}
t_parentwidgetbehavior *wb = pd_getparentwidget(&y->g_pd);
if (!wb) continue;
(*wb->w_parentvisfn)(y, glist, elemtemplatecanvas, sc,
(t_word *)(elem + elemsize * i),
elemtemplate, usexloc, useyloc,
parent
array, tovis);
elemtemplate, usexloc, useyloc, array, tovis);
}
}
}
...
...
@@ -6926,7 +6927,7 @@ static void drawarray_vis(t_gobj *z, t_glist *glist, t_glist *parentglist,
if (!wb) continue;
(*wb->w_parentvisfn)(y, glist, elemtemplatecanvas, sc,
(t_word *)(elem + elemsize * i), elemtemplate,
0, 0,
parent
array, 0);
0, 0, array, 0);
}
}
/* Now remove our drawarray svg container */
...
...
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