Elias Naur
b3517a365e
ui,internal/ops,internal/opconst: move OpsReader to internal ops package
...
To avoid import cycles, move the op constants to its own package,
internal/opconst.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-07 17:21:26 +02:00
Elias Naur
69bba3aa4b
ui,ui/draw: fix decoding of negative integers
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-01 10:43:17 +02:00
Elias Naur
5f2adf9b2f
ui: get rid of Inf
...
It's not worth the special cases. Use a large value where needed
(layout.List, text.Editor...) instead.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-29 12:12:51 +02:00
Elias Naur
84fb7279eb
ui/draw: rename ImageOp.Img to Src
...
To match widget.Image.Src field name.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-18 15:58:11 +02:00
Elias Naur
38ec6a8831
ui/draw: rename ColorOp.Col to Color
2019-07-05 17:14:57 +02:00
Elias Naur
33fc35f58d
ui/draw: switch to color.RGBA for colors
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-02 14:56:48 +02:00
Elias Naur
7aa7bb3be4
ui: rename ops to have Op suffixed, not prefixed
...
Match Go's FooError name pattern.
While we're here, rename RedrawOp to InvalidateOp.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 17:01:45 +02:00
Elias Naur
d67b7eca6c
ui/draw,ui/layout: export OpClip
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-17 16:45:49 +02:00
Elias Naur
955fe1bc77
ui: make the reference list argument to Ops.Write variadic
...
Makes the code nicer.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-03 15:22:11 +02:00
Elias Naur
1e38eec0ab
ui: build paths as ops
...
Instead of allocating and constructing a clip path, store path data
directly in op lists. Use separate op lists for cached text layout
paths.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-02 22:18:04 +02:00
Elias Naur
0d2cffe196
ui: let OpsReader keep track of references
...
Instead of exposing the entire reference slice, return the relevant
references from Next.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-02 19:17:53 +02:00
Elias Naur
00a87f542d
ui: introduce OpColor, a specialized OpImage for uniform colors
...
To avoid allocating an image.Image for OpImage.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-01 13:01:51 +02:00
Elias Naur
0061c73a89
ui: split OpImage into OpImage and OpDraw
...
In preparation for an OpColor (and future OpGradient and similar).
Label and Editor no longer take an explicit source image. They
draw with the current image.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-01 12:44:49 +02:00
Elias Naur
20f55a4ad7
all: delete the ui.Op type
...
It's no longer used.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-04-27 22:27:50 +02:00
Elias Naur
252e058766
all: serialize ops
...
Pros:
- Much less per-frame garbage
- Allow future preprocessing of ops while building it
- Much fewer interface calls and pointer chasing
- Allow future serialization of ops for remote rendering
Cons:
- Slightly clumsier API
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-04-27 22:19:34 +02:00
Elias Naur
48b6a73753
all: run goimports
...
gioui.org/ui was renamed from gioui.org/ui/ui before the release,
but the import order wasn't changed accordingly.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-04-02 17:09:06 +02:00
Elias Naur
0f05231c35
all: initial import
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-03-31 10:47:22 +02:00