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

sdl 2.30.12.0 (32bit) and up svg render issue #12510

Closed
thrive4 opened this issue Mar 10, 2025 · 1 comment · Fixed by #12513
Closed

sdl 2.30.12.0 (32bit) and up svg render issue #12510

thrive4 opened this issue Mar 10, 2025 · 1 comment · Fixed by #12513

Comments

@thrive4
Copy link

thrive4 commented Mar 10, 2025

Seems to be a specific technique in the svg, not all svg's are rendered
incorrectly, not sure if this is os related any way starts with versions
higher than 2.30.12.0 (32bit)

example render issue
https://thrive4.github.io/byexample/sdlbroken.jpg

correct display
https://thrive4.github.io/byexample/sdlnotbroken.jpg

technique:
background_surface = IMG_LoadTexture(renderer, backgroundimage)
SDL_RenderCopyEx(renderer, background_surface, null, @srcrect, rotateangle, null, rotateimage)

tested:
on windows 10 and windows 7
with:
SDL2_image-2.8.5-win32-x86
SDL2_image-2.8.6-win32-x86
SDL2_image-2.8.8-win32-x86
and:
SDL2-2.30.12-win32-x86
SDL2-2.32.2-win32-x86

Note: think it is the main sdl2 dll the older 2.30.12.0 sdl2 dll renders
the svg correctly with sdl2_image 2.8.5 ~ 2.8.8 but I am speculating.

svg:
<svg width='1920' height='1080' viewBox='0 0 800 800'><rect fill='#000022' width='800' height='800'/><g fill='none' stroke-opacity='1'><g stroke='#026' stroke-width='17'><line x1='-8' y1='-8' x2='808' y2='808'/><line x1='-8' y1='792' x2='808' y2='1608'/><line x1='-8' y1='-808' x2='808' y2='8'/></g><g stroke='#002163' stroke-width='16'><line x1='-8' y1='767' x2='808' y2='1583'/><line x1='-8' y1='17' x2='808' y2='833'/><line x1='-8' y1='-33' x2='808' y2='783'/><line x1='-8' y1='-783' x2='808' y2='33'/></g><g stroke='#002060' stroke-width='15'><line x1='-8' y1='742' x2='808' y2='1558'/><line x1='-8' y1='42' x2='808' y2='858'/><line x1='-8' y1='-58' x2='808' y2='758'/><line x1='-8' y1='-758' x2='808' y2='58'/></g><g stroke='#001f5c' stroke-width='14'><line x1='-8' y1='67' x2='808' y2='883'/><line x1='-8' y1='717' x2='808' y2='1533'/><line x1='-8' y1='-733' x2='808' y2='83'/><line x1='-8' y1='-83' x2='808' y2='733'/></g><g stroke='#001e59' stroke-width='13'><line x1='-8' y1='92' x2='808' y2='908'/><line x1='-8' y1='692' x2='808' y2='1508'/><line x1='-8' y1='-108' x2='808' y2='708'/><line x1='-8' y1='-708' x2='808' y2='108'/></g><g stroke='#001d56' stroke-width='12'><line x1='-8' y1='667' x2='808' y2='1483'/><line x1='-8' y1='117' x2='808' y2='933'/><line x1='-8' y1='-133' x2='808' y2='683'/><line x1='-8' y1='-683' x2='808' y2='133'/></g><g stroke='#001c53' stroke-width='11'><line x1='-8' y1='642' x2='808' y2='1458'/><line x1='-8' y1='142' x2='808' y2='958'/><line x1='-8' y1='-158' x2='808' y2='658'/><line x1='-8' y1='-658' x2='808' y2='158'/></g><g stroke='#001b4f' stroke-width='10'><line x1='-8' y1='167' x2='808' y2='983'/><line x1='-8' y1='617' x2='808' y2='1433'/><line x1='-8' y1='-633' x2='808' y2='183'/><line x1='-8' y1='-183' x2='808' y2='633'/></g><g stroke='#001a4c' stroke-width='9'><line x1='-8' y1='592' x2='808' y2='1408'/><line x1='-8' y1='192' x2='808' y2='1008'/><line x1='-8' y1='-608' x2='808' y2='208'/><line x1='-8' y1='-208' x2='808' y2='608'/></g><g stroke='#001949' stroke-width='8'><line x1='-8' y1='567' x2='808' y2='1383'/><line x1='-8' y1='217' x2='808' y2='1033'/><line x1='-8' y1='-233' x2='808' y2='583'/><line x1='-8' y1='-583' x2='808' y2='233'/></g><g stroke='#001846' stroke-width='7'><line x1='-8' y1='242' x2='808' y2='1058'/><line x1='-8' y1='542' x2='808' y2='1358'/><line x1='-8' y1='-558' x2='808' y2='258'/><line x1='-8' y1='-258' x2='808' y2='558'/></g><g stroke='#001743' stroke-width='6'><line x1='-8' y1='267' x2='808' y2='1083'/><line x1='-8' y1='517' x2='808' y2='1333'/><line x1='-8' y1='-533' x2='808' y2='283'/><line x1='-8' y1='-283' x2='808' y2='533'/></g><g stroke='#00163f' stroke-width='5'><line x1='-8' y1='292' x2='808' y2='1108'/><line x1='-8' y1='492' x2='808' y2='1308'/><line x1='-8' y1='-308' x2='808' y2='508'/><line x1='-8' y1='-508' x2='808' y2='308'/></g><g stroke='#00153c' stroke-width='4'><line x1='-8' y1='467' x2='808' y2='1283'/><line x1='-8' y1='317' x2='808' y2='1133'/><line x1='-8' y1='-333' x2='808' y2='483'/><line x1='-8' y1='-483' x2='808' y2='333'/></g><g stroke='#001439' stroke-width='3'><line x1='-8' y1='342' x2='808' y2='1158'/><line x1='-8' y1='442' x2='808' y2='1258'/><line x1='-8' y1='-458' x2='808' y2='358'/><line x1='-8' y1='-358' x2='808' y2='458'/></g><g stroke='#001336' stroke-width='2'><line x1='-8' y1='367' x2='808' y2='1183'/><line x1='-8' y1='417' x2='808' y2='1233'/><line x1='-8' y1='-433' x2='808' y2='383'/><line x1='-8' y1='-383' x2='808' y2='433'/></g><g stroke='#013' stroke-width='1'><line x1='-8' y1='392' x2='808' y2='1208'/><line x1='-8' y1='-408' x2='808' y2='408'/></g></g></svg>

slouken added a commit to slouken/SDL that referenced this issue Mar 10, 2025
slouken added a commit to slouken/SDL that referenced this issue Mar 10, 2025
slouken added a commit that referenced this issue Mar 10, 2025
slouken added a commit that referenced this issue Mar 10, 2025
slouken added a commit that referenced this issue Mar 10, 2025
Fixes #12510

(cherry picked from commit be6ed6e)
(cherry picked from commit 1caae3e)
@slouken
Copy link
Collaborator

slouken commented Mar 10, 2025

Fixed, thanks for the report!

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

Successfully merging a pull request may close this issue.

2 participants