mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 16:35:36 +00:00
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>
This commit is contained in:
+4
-4
@@ -23,13 +23,13 @@ type PathBuilder struct {
|
||||
hasBounds bool
|
||||
}
|
||||
|
||||
// OpClip structure must match opClip in package ui/internal/gpu.
|
||||
// ClipOp structure must match opClip in package ui/internal/gpu.
|
||||
|
||||
type OpClip struct {
|
||||
type ClipOp struct {
|
||||
bounds f32.Rectangle
|
||||
}
|
||||
|
||||
func (p OpClip) Add(o *ui.Ops) {
|
||||
func (p ClipOp) Add(o *ui.Ops) {
|
||||
data := make([]byte, ops.TypeClipLen)
|
||||
data[0] = byte(ops.TypeClip)
|
||||
bo := binary.LittleEndian
|
||||
@@ -278,7 +278,7 @@ func (p *PathBuilder) simpleQuadTo(ctrl, to f32.Point) {
|
||||
|
||||
func (p *PathBuilder) End() {
|
||||
p.end()
|
||||
OpClip{
|
||||
ClipOp{
|
||||
bounds: p.bounds,
|
||||
}.Add(p.ops)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user