gio: op/paint: Correct image loading v1 PROPOSED

~strosel: 1
 op/paint: Correct image loading

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~eliasnaur/gio-patches/patches/9490/mbox | git am -3
Learn more about email & git

[PATCH gio] op/paint: Correct image loading Export this patch

From: axel paulander <axel.paulander@gmail.com>

Corrected the use of draw.Draw in paint.NewImageOp as the old use only works for images starting at the origin
 op/paint/paint.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/op/paint/paint.go b/op/paint/paint.go
index 77ec570..296a75e 100644
--- a/op/paint/paint.go
+++ b/op/paint/paint.go
@@ -59,7 +59,7 @@ func NewImageOp(src image.Image) ImageOp {
	dst := image.NewRGBA(image.Rectangle{
		Max: sz,
	draw.Draw(dst, src.Bounds(), src, image.Point{}, draw.Src)
	draw.Draw(dst, dst.Bounds(), src, src.Bounds().Min, draw.Src)
	return ImageOp{
		src:    dst,
		handle: new(int),
Thank you. Please sign off your patch according to gioui.org/doc/contribute.

On Fri Jan 10, 2020 at 1:14 AM, ~strosel wrote:
View this thread in the archives