forked from joejulian/gio
op/paint: fix subimage rendering by ImageOp
This change is a follow-up to bcf3ff77ff, fixing the two renderers to
properly render images with non-zero origins.
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
+2
-1
@@ -955,7 +955,8 @@ loop:
|
||||
inf := float32(1e6)
|
||||
dst := f32.Rect(-inf, -inf, inf, inf)
|
||||
if state.matType == materialTexture {
|
||||
dst = layout.FRect(state.image.src.Rect)
|
||||
sz := state.image.src.Rect.Size()
|
||||
dst = f32.Rectangle{Max: layout.FPt(sz)}
|
||||
}
|
||||
clipData, bnd, partialTrans := d.boundsForTransformedRect(dst, t)
|
||||
cl := viewport.Intersect(bnd.Add(off))
|
||||
|
||||
Reference in New Issue
Block a user