- m_animation_angle += 15;
- if (m_animation_angle > 360) m_animation_angle -= 360;
-
- wxBitmap image(24, 24);
- {
- wxMemoryDC dc;
- dc.SelectObject(image);
- dc.SetBackground(wxBrush(wxColour(255,0,255)));
- dc.Clear();
-
- if (m_animation_angle >= 0 && m_animation_angle <= 180)
- {
- dc.SetBrush(*wxYELLOW_BRUSH);
- dc.SetPen(*wxYELLOW_PEN);
- dc.DrawCircle(16 - int(sin(m_animation_angle*0.01745f /* convert to radians */)*14.0f),
- 16 + int(cos(m_animation_angle*0.01745f /* convert to radians */)*14.0f), 3 );
- }
-
- dc.DrawBitmap(wxBitmap(wxlogo_xpm), 0, 0, true);
-
- if (m_animation_angle > 180)
- {
- dc.SetBrush(*wxYELLOW_BRUSH);
- dc.SetPen(*wxYELLOW_PEN);
- dc.DrawCircle(16 - int(sin(m_animation_angle*0.01745f /* convert to radians */)*14.0f),
- 16 + int(cos(m_animation_angle*0.01745f /* convert to radians */)*14.0f), 3 );
- }
- }
- image.SetMask(new wxMask(image, wxColour(255,0,255)));
- m_toolbar->SetToolNormalBitmap(m_toolbar_tools->GetId(), image);