forked from joejulian/gio
all: [API] change clip.RRect and UniformRRect to take integer coordinates
Like the change to op.Offset before this, clip.RRect and UniformRRect is usually used with integer coordinates. Change to integer coordinates to eliminate many useless conversions to float32. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
package clip_test
|
||||
|
||||
import (
|
||||
"image"
|
||||
"image/color"
|
||||
"testing"
|
||||
|
||||
"gioui.org/f32"
|
||||
"gioui.org/op"
|
||||
"gioui.org/op/clip"
|
||||
"gioui.org/op/paint"
|
||||
)
|
||||
|
||||
func TestZeroEllipse(t *testing.T) {
|
||||
p := f32.Pt(1.0, 2.0)
|
||||
p := image.Pt(1.0, 2.0)
|
||||
e := clip.Ellipse{Min: p, Max: p}
|
||||
ops := new(op.Ops)
|
||||
paint.FillShape(ops, color.NRGBA{R: 255, A: 255}, e.Op(ops))
|
||||
|
||||
Reference in New Issue
Block a user