IMG_LoadSizedSVG_IO(3)

IMG_LoadSizedSVG_IO3

Load an svg image, scaled to a specific size.

Usage

#include "SDL3_image/SDL_image.h"

SDL_Surface * IMG_LoadSizedSVG_IO(SDL_IOStream *src, int width, int height);

Header file

Defined in SDL3_image/SDL_image.h

Overview

Since SVG files are resolution-independent, you specify the size you would like the output image to be and it will be generated at those dimensions.

Either width or height may be 0 and the image will be auto-sized to preserve aspect ratio.

When done with the returned surface, the app should dispose of it with a call to SDL_DestroySurface().

Function parameters

src

an SDL_IOStream to 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.

Availability

This function is available since SDL_image 3.0.0.

From libsdl3-image-doc 3.2.4+ds-1+deb13u1 in Debian 13 (Trixie). Parsed by carta from the page's man source.