#include <algorithm>
#include <smk/Color.hpp>
#include <smk/Shape.hpp>
#include <smk/Window.hpp>
int main() {
window.ExecuteMainLoop([&] {
window.PoolEvents();
window.SetView(view);
float radius = std::min(window.width(), window.height()) * 0.5 *
(0.5 + 0.5 * sin(window.time() * 4.0));
float margin = 40.f;
window.width() - margin, window.height() - margin, radius);
rounded_rectangle.Move(window.dimensions() * 0.5f);
window.Draw(rounded_rectangle);
window.Display();
});
return EXIT_SUCCESS;
}
static Transformable RoundedRectangle(float width, float height, float radius)
Return a rounded centered rectangle. @params width The width of the rectangle. @params height The hei...
void SetCenter(float x, float y)
Set the center position of the in-game view. param x The center of the view along the horizontal axis...
void SetSize(float width, float height)
Set the size of the in-game view. param width The size of the view along the horizontal axis....
A window. You can draw objects on the window.
const glm::vec4 Black
Black.