| Summary: | SDL_SetWindowShape can produce strange results | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Jørgen Tjernø <jorgen> |
| Component: | video | Assignee: | Jørgen Tjernø <jorgen> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | bugzilla-sdl, icculus |
| Version: | 2.0.3 | ||
| Hardware: | All | ||
| OS: | Windows 7 | ||
| Attachments: |
Window shape bitmap
Shaped window screenshot Image causing SDL_SetWindowShape to render the Window shape incorectly |
||
Created attachment 1855 [details]
Shaped window screenshot
Attached is a screenshot of test_shape.exe on the previously attached window_shape.bmp, running on a white background. Artifacts are obviously visible.
I have a fix for this locally, I'll push it on Monday or Tuesday. The shape tree building code only works properly on power-of-two images, on other images it skips some pixels. On Windows, this turns into blank spaces, since the Windows shaping code builds up a region of all the opaque spaces. Should be fixed in https://hg.libsdl.org/SDL/rev/cd6696d55781 Created attachment 2139 [details]
Image causing SDL_SetWindowShape to render the Window shape incorectly
This bug is not fixed for me. I just attached a bmp that renders the window shape very strangely. Skipping some pixels again. If I resize it to a power of 2 resolution, the shape is rendered correctly. I was using the prebuilt .lib & .dll from the download page (https://www.libsdl.org/download-2.0.php). Tried rebuilding SDL from source and the issue is indeed fixed but the binaries distribution would probably need to be refreshed. This is fixed, it is just that the last release (2.0.3) came out on 2014-03-15. 2.0.4 will contains this fix. (In reply to Jørgen Tjernø from comment #7) > This is fixed, it is just that the last release (2.0.3) came out on > 2014-03-15. 2.0.4 will contains this fix. (and we're working on wrapping up 2.0.4 right now.) --ryan. |
Created attachment 1854 [details] Window shape bitmap Some SDL_Surfaces passed to SDL_SetWindowShape will produce strange results. Tested on Windows 7. The attached window_shape.bmp can be passed to test_shape, and will produce strange artifacts.