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
David MacDonald
purr-data
Commits
987b40a4
Commit
987b40a4
authored
Feb 07, 2017
by
Jonathan Wilkes
Browse files
fix #242: VU base rectangle is drawn too wide and overlaps the scale when placed on a GOP canvas
parent
855a86ad
Changes
1
Show whitespace changes
Inline
Side-by-side
pd/src/g_vumeter.c
View file @
987b40a4
...
@@ -137,8 +137,18 @@ static void vu_draw_new(t_vu *x, t_glist *glist)
...
@@ -137,8 +137,18 @@ static void vu_draw_new(t_vu *x, t_glist *glist)
int
k1
=
x
->
x_led_size
+
1
,
k2
=
IEM_VU_STEPS
+
1
,
k3
=
k1
/
2
;
int
k1
=
x
->
x_led_size
+
1
,
k2
=
IEM_VU_STEPS
+
1
,
k3
=
k1
/
2
;
int
led_col
,
yyy
,
i
,
k4
=
y1
-
k3
;
int
led_col
,
yyy
,
i
,
k4
=
y1
-
k3
;
char
cbuf
[
8
];
char
cbuf
[
8
];
/* vumeter is a special case because the base doesn't actually
cover the entire bbox returned by vu_getrect. Instead it is
the bbox minus the width of the scale. That means the call
below is going to draw a base rectangle that is too wide... */
iemgui_base_draw_new
(
&
x
->
x_gui
);
iemgui_base_draw_new
(
&
x
->
x_gui
);
/* ...as a quick and dirty bugfix, we just make another call
and send the correct size */
gui_vmess
(
"gui_vumeter_border_size"
,
"xxii"
,
canvas
,
x
,
x
->
x_gui
.
x_w
+
2
,
x
->
x_gui
.
x_h
+
4
);
for
(
i
=
1
;
i
<=
IEM_VU_STEPS
+
1
;
i
++
)
for
(
i
=
1
;
i
<=
IEM_VU_STEPS
+
1
;
i
++
)
{
{
yyy
=
k4
+
k1
*
(
k2
-
i
);
yyy
=
k4
+
k1
*
(
k2
-
i
);
...
@@ -186,6 +196,8 @@ static void vu_draw_move(t_vu *x, t_glist *glist)
...
@@ -186,6 +196,8 @@ static void vu_draw_move(t_vu *x, t_glist *glist)
int
k1
=
x
->
x_led_size
+
1
,
k2
=
IEM_VU_STEPS
+
1
,
k3
=
k1
/
2
;
int
k1
=
x
->
x_led_size
+
1
,
k2
=
IEM_VU_STEPS
+
1
,
k3
=
k1
/
2
;
int
yyy
,
i
,
k4
=
y1
-
k3
;
int
yyy
,
i
,
k4
=
y1
-
k3
;
iemgui_base_draw_move
(
&
x
->
x_gui
);
gui_vmess
(
"gui_vumeter_border_size"
,
"xxii"
,
gui_vmess
(
"gui_vumeter_border_size"
,
"xxii"
,
canvas
,
x
,
x
->
x_gui
.
x_w
+
2
,
x
->
x_gui
.
x_h
+
4
);
canvas
,
x
,
x
->
x_gui
.
x_w
+
2
,
x
->
x_gui
.
x_h
+
4
);
for
(
i
=
1
;
i
<=
IEM_VU_STEPS
;
i
++
)
for
(
i
=
1
;
i
<=
IEM_VU_STEPS
;
i
++
)
...
...
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