Doc, Draw: Improve draw tutorial and add missing code to tutorial source code

This commit is contained in:
klugier 2025-12-19 23:04:52 +01:00
parent a8fa1ec628
commit 8911eacec2
6 changed files with 108 additions and 66 deletions

View file

@ -8,7 +8,7 @@ struct MyApp : TopWindow {
w.DrawText(0, 0, "Hello world", Roman(30).Bold());
}
virtual void Paint(Draw& w) override {
void Paint(Draw& w) override {
w.DrawRect(GetSize(), White());
DoPainting(w);
w.Offset(30, 50);
@ -27,5 +27,8 @@ struct MyApp : TopWindow {
GUI_APP_MAIN
{
MyApp().Sizeable().Run();
MyApp app;
app.Title("Offsets and Cliping").Zoomable().Sizeable();
app.SetRect(0, 0, 420, 240);
app.Run();
}