forked from joejulian/gio
app/headless,internal/rendertest: replace PaintOps with Fill/FillShape
We're about to remove PaintOp.Rect. Replacing PaintOps with Fill or FillShape where possible will ease the transition. Using Fill in tests exposed a problem with the infinity in paint.Fill. Adjust it for now; it will be removed later. Updates gio#167 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -160,7 +160,7 @@ func FillShape(ops *op.Ops, c color.RGBA, shape clip.Op) {
|
||||
func Fill(ops *op.Ops, c color.RGBA) {
|
||||
defer op.Push(ops).Pop()
|
||||
ColorOp{Color: c}.Add(ops)
|
||||
inf := float32(math.Inf(+1))
|
||||
inf := float32(1e6)
|
||||
PaintOp{
|
||||
Rect: f32.Rectangle{
|
||||
Min: f32.Pt(-inf, -inf),
|
||||
|
||||
Reference in New Issue
Block a user