From 83c2180348ae4722157e12facfa9cd70c2c955d0 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 16:25:52 +0300 Subject: Drop the hello draw snippet from the README The README links to examples/hello.c, so a copy of its draw callback only goes stale. Co-Authored-By: Claude Opus 5.5 --- README.md | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index d94edb1..a02ba9e 100644 --- a/README.md +++ b/README.md @@ -49,20 +49,8 @@ explicit backend with `yasl_display_spec.backend`. Include `` and pass application callbacks to `yasl_run()`. The complete [hello.c](examples/hello.c) describes its window in -`yasl_app_desc.window`, lets the runner quit when it is closed, and fills every pixel -in its frame callback: - -```c -static void draw(void *ud, struct yasl_surface *surface, struct yasl_frame_context *frame) -{ - (void)ud; - size_t count = (size_t)frame->size.x * frame->size.y; - for (size_t i = 0; i < count; i++) - frame->cpu.pixels[i] = 0xff306090; - if (!yasl_frame_present_cpu(frame, NULL, 0)) - yasl_surface_destroy(surface); -} -``` +`yasl_app_desc.window`, lets the runner quit when it is closed, and fills every +pixel with an RGB gradient in its frame callback. Toplevel creation sizes are logical pixels; drawing and input use device pixels. Targets are borrowed for one frame callback. Keep durable content in application -- cgit v1.2.3