mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
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>
This commit is contained in:
@@ -4,15 +4,8 @@ package path
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"gioui.org/ui/f32"
|
||||
)
|
||||
|
||||
type Path struct {
|
||||
Vertices []Vertex
|
||||
Bounds f32.Rectangle
|
||||
}
|
||||
|
||||
// The vertex data suitable for passing to vertex programs.
|
||||
type Vertex struct {
|
||||
CornerX, CornerY int16
|
||||
|
||||
Reference in New Issue
Block a user