op/paint: make the shape argument last in FillShape

FillShape is a generalization of Fill, so it seems more natural to
have the extra argument last.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-11-03 17:30:21 +01:00
parent 3107c95757
commit efdd5ae602
+2 -3
View File
@@ -156,9 +156,8 @@ func (d PaintOp) Add(o *op.Ops) {
bo.PutUint32(data[13:], math.Float32bits(d.Rect.Max.Y)) bo.PutUint32(data[13:], math.Float32bits(d.Rect.Max.Y))
} }
// FillShape fills the area described by the provided clip.Op with the // FillShape fills the clip shape with a color.
// provided color. func FillShape(ops *op.Ops, c color.RGBA, shape clip.Op) {
func FillShape(ops *op.Ops, shape clip.Op, c color.RGBA) {
defer op.Push(ops).Pop() defer op.Push(ops).Pop()
shape.Add(ops) shape.Add(ops)
Fill(ops, c) Fill(ops, c)