forked from joejulian/gio
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:
+2
-2
@@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"image"
|
||||
|
||||
"gioui.org/ui/draw"
|
||||
"gioui.org/ui"
|
||||
"gioui.org/ui/layout"
|
||||
"golang.org/x/image/math/fixed"
|
||||
)
|
||||
@@ -35,7 +35,7 @@ type Layout struct {
|
||||
|
||||
type Face interface {
|
||||
Layout(str string, singleLine bool, maxWidth int) *Layout
|
||||
Path(str String) *draw.Path
|
||||
Path(str String) ui.OpBlock
|
||||
}
|
||||
|
||||
type Alignment uint8
|
||||
|
||||
Reference in New Issue
Block a user