Cool! Thank you.

On Sat, Apr 4, 2020, 9:17 PM Fazlul Shahriar <fshahr...@gmail.com> wrote:

> There is a PR open with Plan 9 devdraw support to 9fans.net/go/draw:
> https://github.com/9fans/go/pull/28
> It at least works with the Go acme port Edwood last I tested.
>
> On Sat, Apr 4, 2020 at 4:33 PM Jeremy Jackins <jeremyjack...@gmail.com>
> wrote:
>
>> Well, you need a Go draw package in place of the C library. There is a
>> draw package in github.com/9fans/go/ but unfortunately I think it only
>> supports plan9port devdraw, rather than the native Plan 9 draw device.
>> So there is some library work to be done first. Since the Go standard
>> library also contains the most important drawing primitives
>> implemented by the Plan 9 draw device (with the exception of font
>> rendering, but there is golang.org/x/image/font), you may be able to
>> ignore a lot of functionality provided by the Plan 9 draw library and
>> focus on a few things like loading pixel data directly to the draw
>> device.
>>
>> See: http://man.cat-v.org/plan_9/3/draw
>>
>> Jeremy
>>
>> On Sat, 4 Apr 2020 at 06:55, 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 / 9fans / see discussions + participants + delivery options
>> Permalink
> *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-Mfd4090e269de1d17fc3df91d>
>

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T0d490c91935dc74b-Mb1c740447ef24502b2b22ec6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to