From 50e14d90c1a21ada8130761d5eb484000c374582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= Date: Thu, 4 Jan 2024 18:49:54 +0100 Subject: [PATCH] Update documentation --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 24e01fc..8d7c5f2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Concurrent software rendering, triangle rasterization and pixel buffer manipulat ## Getting started -A single red pixel in the upper left corner: +This simple program imports pixelpusher, sets up a callback function for drawing pixels to `gfx.Pixels`, creates a `pixelpusher.Config` struct and then calls the `.Run` function. The window title is `Red Pixel`: ``` package main @@ -33,7 +33,7 @@ import ( ) func onDraw(gfx *pixelpusher.Config) error { - // x, y, r, g, b + // x=0, y=0, red=255, green=0, blue=0 return pixelpusher.Plot(gfx, 0, 0, 255, 0, 0) } @@ -43,7 +43,7 @@ func main() { } ``` -A very simple drawing program: +This program allows the user to press the arrow keys or the WASD keys to move a red pixel around and draw something. Press `ctrl-s` to save the image and press `Esc` or `q` to quit. ```go package main