IMG_LoadSizedSVG_IO(3)
π¦ IMG_LoadSizedSVG_IO(3) π¦
okay so bestie, you found the SDL_image3 FUNCTIONS page for IMG_LoadSizedSVG_IO, and itβs giving βI want an SVG, but at my exact sizeβ energy. β¨
π NAME π
IMG_LoadSizedSVG_IO β Load an SVG image, scaled to a specific size.
β¨ SYNOPSIS β¨
#include <SDL3_image/SDL_image.h>
SDL_Surface * IMG_LoadSizedSVG_IO(SDL_IOStream *src, int width, int height);
πΈ DESCRIPTION πΈ
SVG files are resolution-independent, so you literally tell this function what size you want the output image to be, and it generates the image at those exact dimensions. π no cap.
Either width or height can be 0, and then the image auto-sizes itself to preserve the aspect ratio. π«Ά
When youβre done with the returned surface, the app should dispose of it with a call to SDL_DestroySurface(). Donβt leave your surface hanging, bestie. π
π FUNCTION PARAMETERS π
srcβ anSDL_IOStreamto load SVG data from.widthβ desired width of the generated surface, in pixels.heightβ desired height of the generated surface, in pixels.
π RETURN VALUE π
Returns a new SDL_Surface, or NULL on error. Simple as that. β¨
π AVAILABILITY π
This function is available since SDL_image 3.0.0. ποΈ
π¦ SEE ALSO π¦
and thatβs the whole vibe. this page is from the SDL_image 3.4.4 manual β the footer doesnβt list a date, so no fake tea from me, periodt. πβ¨π
π¦ where this page comes from
- ubuntu stonking: libsdl3-image-doc 3.4.4+ds-2 Β· zlib/libpng AND HPND-like AND zlib-like-permissive
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms