ui/draw,ui/layout: export OpClip

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-17 16:45:49 +02:00
parent 1765a66fd6
commit d67b7eca6c
3 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -113,10 +113,10 @@ func (d *OpDraw) Decode(data []byte, refs []interface{}) {
}
}
// RectClip append a clip op corresponding to
// RectClip returns an OpClip op corresponding to
// a pixel aligned rectangular area.
func RectClip(ops *ui.Ops, r image.Rectangle) {
opClip{bounds: toRectF(r)}.Add(ops)
func RectClip(r image.Rectangle) OpClip {
return OpClip{bounds: toRectF(r)}
}
func itof(i int) float32 {