Skip to content

Instantly share code, notes, and snippets.

@dacap
Created December 27, 2014 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacap/4f1ae8edd4cd30effd4f to your computer and use it in GitHub Desktop.
Save dacap/4f1ae8edd4cd30effd4f to your computer and use it in GitHub Desktop.
#include <iostream>
#include "miniapp/miniapp.h"
using namespace miniapp;
int main()
try {
Window w;
w.on_paint = [](Canvas& canvas) {
canvas.fill_rect(rgb(255, 255, 255), Rect(0, 0, 255, 255));
canvas.fill_rect(rgb(0, 0, 255), Rect(32, 32, 100, 100));
};
w.show();
App().run(w);
}
catch (const std::exception& e) {
std::cout << e.what() << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment