Skip to content
GitLab
Menu
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
bb472b7c
Commit
bb472b7c
authored
Feb 27, 2016
by
Jonathan Wilkes
Browse files
simplify the function call for redrawing message box bordre
parent
644125eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
pd/nw/pdgui.js
View file @
bb472b7c
...
...
@@ -1432,18 +1432,22 @@ function gui_gobj_highlight_io(cid, tag) {
}
}
function
gui_message_draw_border
(
cid
,
tag
,
width
,
height
)
{
function
message_border_points
(
width
,
height
)
{
return
[
0
,
0
,
width
+
4
,
0
,
width
,
4
,
width
,
height
-
4
,
width
+
4
,
height
,
0
,
height
,
0
,
0
]
.
join
(
"
"
);
}
function
gui_message_draw_border
(
cid
,
tag
,
width
,
height
)
{
var
g
=
get_gobj
(
cid
,
tag
),
p_array
=
[
0
,
0
,
width
+
4
,
0
,
width
,
4
,
width
,
height
-
4
,
width
+
4
,
height
,
0
,
height
,
0
,
0
],
polygon
;
polygon
=
create_item
(
cid
,
"
polygon
"
,
{
points
:
p_array
.
join
(
),
points
:
message_border_points
(
width
,
height
),
fill
:
"
none
"
,
stroke
:
"
black
"
,
class
:
"
border
"
...
...
@@ -1461,12 +1465,11 @@ function gui_message_flash(cid, tag, state) {
}
}
function
gui_message_redraw_border
(
cid
,
tag
,
p1
,
p2
,
p3
,
p4
,
p5
,
p6
,
p7
,
p8
,
p9
,
p10
,
p11
,
p12
,
p13
,
p14
)
{
function
gui_message_redraw_border
(
cid
,
tag
,
width
,
height
)
{
var
g
=
get_gobj
(
cid
,
tag
),
b
=
g
.
querySelector
(
"
.border
"
),
p_array
=
[
p1
,
p2
,
p3
,
p4
,
p5
,
p6
,
p7
,
p8
,
p9
,
p10
,
p11
,
p12
,
p13
,
p14
];
b
=
g
.
querySelector
(
"
.border
"
);
configure_item
(
b
,
{
points
:
p_array
.
join
(
"
"
),
points
:
message_border_points
(
width
,
height
),
});
}
...
...
pd/src/g_text.c
View file @
bb472b7c
...
...
@@ -2192,10 +2192,8 @@ void text_drawborder(t_text *x, t_glist *glist,
// x1, y1, x2+4, y1, x2, y1+4, x2, y2-4, x2+4, y2,
// x1, y2, x1, y1);
/* These coords can be greatly simplified, as above... */
gui_vmess
(
"gui_message_redraw_border"
,
"xsiiiiiiiiiiiiii"
,
glist_getcanvas
(
glist
),
tag
,
x1
-
x1
,
y1
-
y1
,
x2
+
4
-
x1
,
y1
-
y1
,
x2
-
x1
,
y1
+
4
-
y1
,
x2
-
x1
,
y2
-
4
-
y1
,
x2
+
4
-
x1
,
y2
-
y1
,
x1
-
x1
,
y2
-
y1
,
x1
-
x1
,
y1
-
y1
);
gui_vmess
(
"gui_message_redraw_border"
,
"xsii"
,
glist_getcanvas
(
glist
),
tag
,
x2
-
x2
,
y2
-
y1
);
}
}
else
if
(
x
->
te_type
==
T_ATOM
)
...
...
Write
Preview
Supports
Markdown
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