You can try this Go library by mischief and some examples in the cmd package: https://bitbucket.org/mischief/draw9/src/default/
Last I recall, it worked fine on 9front. I'm not sure about the other variants. Cheers, Chris On Sat, Apr 4, 2020 at 9:54 AM Kim Lassila <kim.lass...@gmail.com> wrote: > Has anyone written a graphical application in Go on Plan 9? How would the > Go equivalent of black.c (thank you fgb) look like? > > - - - clip - - - > > #include <u.h> > #include <libc.h> > #include <draw.h> > > void > main(int, char *argv[]) > { > Rectangle rect; > Image *black; > > fmtinstall('R', Rfmt); > if(initdraw(nil, nil, argv[0]) < 0) > sysfatal("initdraw: %r"); > rect = screen->r; > black = display->black; > draw(screen, rect, black, nil, ZP); > flushimage(display, 1); > sleep(5 * 1000); > closedisplay(display); > print("rectangle was %R\n", rect); > exits(nil); > } > > *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions > <https://9fans.topicbox.com/groups/9fans> + participants > <https://9fans.topicbox.com/groups/9fans/members> + delivery options > <https://9fans.topicbox.com/groups/9fans/subscription> Permalink > <https://9fans.topicbox.com/groups/9fans/T0d490c91935dc74b-M9cbad5709834cc595acc4061> > ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T0d490c91935dc74b-M59941541b5e841e6d425ac7e Delivery options: https://9fans.topicbox.com/groups/9fans/subscription