~eliasnaur/gio

ref: 5c3dcc6f9a07dc22a26319616adc2c63e33da966 gio/ui/paint/path.go -rw-r--r-- 7.6 KiB
ui/paint: expand documentation and add package description

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui/paint: rename the draw package

The draw package name clashes with the standard library draw package.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
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>
draw: Fix spelling of Bezier

Sometimes it was "bezier", sometimes "beziér".  Capitalize and put
accent on first e.  https://en.wikipedia.org/wiki/Bézier_curve

Signed-off-by: Larry Clapp <larry@theclapp.org>
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>
ui/draw,ui/layout: export OpClip

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui: remove ui.Ops parameters from layouts and path builder structs

Layouts and path builders are transient and need an ops list for
operation. However, instead of passing the ops list to every method,
pass the list in an init method and store it for subsequent methods.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui: make the reference list argument to Ops.Write variadic

Makes the code nicer.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
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>
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>
ui/draw: typo

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: delete the ui.Op type

It's no longer used.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
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>
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>
all: initial import

Signed-off-by: Elias Naur <mail@eliasnaur.com>