31 wnd.BindCanvas(&canvas);
36 canvas.
Clear(
true, BLACK);
39 btn.
Create(wnd.GetHandle(), 50, 50, 120, 30, L
"Hide outline");
46 srand((UINT)time(
nullptr));
57 i.
x = (float)(rand() % canvas.
GetWidth());
58 i.y = (float)(rand() % canvas.
GetHeight());
59 i.vx = rand() % 5 * (rand() % 2 ? 2.0f : -2.0f);
60 i.vy = rand() % 5 * (rand() % 2 ? 2.0f : -2.0f);
68 i.img.GetCanvas()->Clear();
70 ReverseAlpha(i.img.GetCanvas()->GetBuffer(), i.img.GetCanvas()->GetBufferSize());
74 i.img.bUseSrcAlpha =
true;
77 layer.push_back(&i.img);
81 scene.push_back(&layer);
84 while (wnd.IsAlive() && !
peekmessage(
nullptr, EM_CHAR))