Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CopyExF ignores src rect #458

Open
snakeru opened this issue May 4, 2020 · 5 comments
Open

CopyExF ignores src rect #458

snakeru opened this issue May 4, 2020 · 5 comments

Comments

@snakeru
Copy link

snakeru commented May 4, 2020

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.

@veeableful
Copy link
Contributor

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!

@snakeru
Copy link
Author

snakeru commented May 7, 2020

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.

@veeableful
Copy link
Contributor

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!

@Schobers
Copy link
Contributor

Schobers commented May 8, 2020

Added PR #460 for the Renderer.CopyF signature.

@veeableful
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants