shiny backend for duit
Duit is a ui toolkit for go. As a backend it uses plan9 port's /dev/draw emulation via a go interface.
This has a some drawbacks:
- heavy run time dependency
- no easy windows support
- no simple deployment with a single static binary
As a first step duitdraw
is a drop-in replacement for github.com/9fans/go/draw
, using a backend based on shiny. This has the advantage, that no changes are needed for duit.
Once this becomes a valid alternative to the original drawing backend, duit could be changed to interface better with shiny.
The scope of the package is not a full implementation of 9fans.net/go/draw
. Everything that is not needed by duit in the initial release state is removed.
To try the backend, copy the content of this repository to $GOPATH/src/9fans.net/go/draw
and recompile duit.
This is just a very basic first first release and tested only on windows. Please test and comment.
- fonts (right now Go regular is embedded)
- plan9 style or ttf path?
- ttf: freetype or golang.org/x/image/font/sfnt?
- drawing
- only a simple line algorithm is implemented
- which rasterization should be used, freetype or golang.org/x/image/vector?
- general line rasterizer missing
- Arc, FillArc missing (ellipse.go)
- clipboard
- uses atotto's, is that ok?
- mouse movement
- uses as/cursor, is that ok?
- inner window offset is hard coded
- shiny
- window flickers on resize, are we using shiny the wrong way?