reverted a previous change as it was not correct

This commit is contained in:
Thomas Friedel 2020-02-14 16:34:38 +01:00
parent 55572c59da
commit 3e6e46ca0d

View file

@ -17,12 +17,11 @@ func (b *GoGLBackend) Clip(pts [][2]float64) {
b.activate()
b.ptsBuf = b.ptsBuf[:0]
min, max := extent(pts)
b.ptsBuf = append(b.ptsBuf,
float32(min[0]), float32(min[1]),
float32(min[0]), float32(max[1]),
float32(max[0]), float32(max[1]),
float32(max[0]), float32(min[1]))
0, 0,
0, float32(b.fh),
float32(b.fw), float32(b.fh),
float32(b.fw), 0)
for _, pt := range pts {
b.ptsBuf = append(b.ptsBuf, float32(pt[0]), float32(pt[1]))
}