forked from joejulian/gio
48a8540a68
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>
19 lines
307 B
Go
19 lines
307 B
Go
package clip_test
|
|
|
|
import (
|
|
"image"
|
|
"image/color"
|
|
"testing"
|
|
|
|
"gioui.org/op"
|
|
"gioui.org/op/clip"
|
|
"gioui.org/op/paint"
|
|
)
|
|
|
|
func TestZeroEllipse(t *testing.T) {
|
|
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))
|
|
}
|