fixed a rect clipping bug

This commit is contained in:
Thomas Friedel 2019-01-26 23:02:02 +01:00
parent c1f855278d
commit 7aeae444a9

View file

@ -568,6 +568,10 @@ func (cv *Canvas) scissor(path []pathPoint) {
br[1] = math.Min(br[1], cv.state.scissor.br[1])
}
if tl[0] >= br[0] || tl[1] >= br[1] {
tl, br = vec{}, vec{}
}
cv.state.scissor = scissor{tl: tl, br: br, on: true}
cv.applyScissor()
}