fix issue 23

This commit is contained in:
Laurent Le Goff 2012-04-24 10:28:31 +02:00
parent 041bb7cbbb
commit fda5c8e713
1 changed files with 28 additions and 26 deletions

View File

@ -116,6 +116,7 @@ func DrawImage(src image.Image, dest draw.Image, tr MatrixTransform, op draw.Op,
u = x u = x
v = y v = y
tr.InverseTransform(&u, &v) tr.InverseTransform(&u, &v)
if bounds.Min.X <= int(u) && bounds.Max.X > int(u) && bounds.Min.Y <= int(v) && bounds.Max.Y > int(v) {
c1 = dest.At(int(x), int(y)) c1 = dest.At(int(x), int(y))
switch filter { switch filter {
case LinearFilter: case LinearFilter:
@ -146,3 +147,4 @@ func DrawImage(src image.Image, dest draw.Image, tr MatrixTransform, op draw.Op,
} }
} }
} }
}