mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2025-01-15 17:02:52 +08:00
add valid check for wav_ctrl
This commit is contained in:
parent
e4d73bf327
commit
c796a4b286
@ -594,7 +594,6 @@ void c_surface_mcu::fill_rect(int x0, int y0, int x1, int y1, unsigned int rgb,
|
|||||||
{
|
{
|
||||||
return m_gfx_op->fill_rect(x0, y0, x1, y1, rgb);
|
return m_gfx_op->fill_rect(x0, y0, x1, y1, rgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; y0 <= y1; y0++)
|
for (; y0 <= y1; y0++)
|
||||||
{
|
{
|
||||||
draw_hline(x0, x1, y0, rgb, z_order);
|
draw_hline(x0, x1, y0, rgb, z_order);
|
||||||
|
@ -258,16 +258,18 @@ void c_wave_ctrl::restore_background()
|
|||||||
register int width = rect.Width();
|
register int width = rect.Width();
|
||||||
register int top = rect.m_top;
|
register int top = rect.m_top;
|
||||||
register int left = rect.m_left;
|
register int left = rect.m_left;
|
||||||
unsigned int* p_fb = m_bg_fb;
|
|
||||||
|
|
||||||
for (int y_pos = (m_wave_top - 1); y_pos <= (m_wave_bottom + 1); y_pos++)
|
for (int y_pos = (m_wave_top - 1); y_pos <= (m_wave_bottom + 1); y_pos++)
|
||||||
{
|
{
|
||||||
draw_pixel(x, y_pos, p_fb[(y_pos - top) * width + (x - left)]);
|
(m_bg_fb) ? draw_pixel(x, y_pos, m_bg_fb[(y_pos - top) * width + (x - left)]) : draw_pixel(x, y_pos, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void c_wave_ctrl::save_background()
|
void c_wave_ctrl::save_background()
|
||||||
{
|
{
|
||||||
|
if (!m_bg_fb)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
c_rect rect;
|
c_rect rect;
|
||||||
get_screen_rect(rect);
|
get_screen_rect(rect);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user