mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
op/paint: return ClipOp from Path.End
Instead of adding an implicit ClipOp, return a ClipOp ready to use, freeing the caller from recording a macro. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@ import (
|
||||
"image"
|
||||
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op"
|
||||
"gioui.org/op/paint"
|
||||
"golang.org/x/image/math/fixed"
|
||||
)
|
||||
|
||||
@@ -64,8 +64,8 @@ type Family interface {
|
||||
// Layout returns the text layout for a string given a set of
|
||||
// options.
|
||||
Layout(face Face, size float32, s string, opts LayoutOptions) *Layout
|
||||
// Path returns the ClipOp outline of a text recorded in a macro.
|
||||
Shape(face Face, size float32, s String) op.MacroOp
|
||||
// Path returns the ClipOp outline of a text.
|
||||
Shape(face Face, size float32, s String) paint.ClipOp
|
||||
}
|
||||
|
||||
type Alignment uint8
|
||||
|
||||
Reference in New Issue
Block a user