mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2025-01-29 17:22:55 +08:00
refactor wave_ctrl
This commit is contained in:
parent
5f6a8b33e2
commit
aebfd5449c
@ -169,18 +169,14 @@ void c_wave_ctrl::refresh_wave(unsigned char frame)
|
|||||||
CORRECT(y_max, m_wave_bottom, m_wave_top);
|
CORRECT(y_max, m_wave_bottom, m_wave_top);
|
||||||
CORRECT(mid, m_wave_bottom, m_wave_top);
|
CORRECT(mid, m_wave_bottom, m_wave_top);
|
||||||
|
|
||||||
|
if (m_wave_cursor > m_wave_right)
|
||||||
|
{
|
||||||
|
m_wave_cursor = m_wave_left;
|
||||||
|
}
|
||||||
draw_smooth_vline(y_min, y_max, mid, m_wave_color);
|
draw_smooth_vline(y_min, y_max, mid, m_wave_color);
|
||||||
restore_background();
|
restore_background();
|
||||||
//ring the wave
|
|
||||||
if ((m_wave_cursor + 1) > m_wave_right)
|
|
||||||
{
|
|
||||||
m_wave_cursor = m_wave_left ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_wave_cursor++;
|
m_wave_cursor++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void c_wave_ctrl::draw_smooth_vline(int y_min, int y_max, int mid, unsigned int rgb)
|
void c_wave_ctrl::draw_smooth_vline(int y_min, int y_max, int mid, unsigned int rgb)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user