go-sdl2 icon indicating copy to clipboard operation
go-sdl2 copied to clipboard

CopyExF ignores src rect

Open snakeru opened this issue 4 years ago • 5 comments

It seems that the F variant of CopyEx ignores the source rectangle.

This code renderer.CopyEx(texture, &sdl.Rect{W: 60, H: 60}, nil, 0, nil, sdl.FLIP_NONE) correctly renders the cropped texture full-screen.

This code however renderer.CopyExF(texture, &sdl.FRect{W: 60, H: 60}, nil, 0, nil, sdl.FLIP_NONE) renders the whole texture full-screen.

snakeru avatar May 04 '20 05:05 snakeru

Hi @snakeru, I'm sorry for the wait. I have pushed the fix up to the master branch. Could you please test it out and let me know if it solves the issue? Once it's confirmed to be fixed on your side, I will immediately tag it as the next patch release!

veeableful avatar May 07 '20 18:05 veeableful

Hi @veeableful. You call that a wait??? Frankly, I thought that this is an upstream bug and therefore it will take months to be fixed.

Anyway, it works now. Many thanks! you can include this into your next release.

snakeru avatar May 07 '20 19:05 snakeru

Haha I usually try to respond within two days so it's a relief that you didn't wait long 😃

In any case, I have pushed it as v0.4.2!

veeableful avatar May 07 '20 19:05 veeableful

Added PR #460 for the Renderer.CopyF signature.

Schobers avatar May 08 '20 18:05 Schobers

Hi @Schobers, thank you so much! I have merged the commit and tagged it as the next patch release.

veeableful avatar May 09 '20 03:05 veeableful