Get the raw SVG data for one axis on a controller.
Defined in <controllerimage.h>
const char * ControllerImage_GetSVGForAxis(ControllerImage_Device *device, SDL_GamepadAxis axis);| ControllerImage_Device * | device | the device object for which to obtain SVG data. |
| SDL_GamepadAxis | axis | the axis on the device for which to obtain SVG data. |
(const char *) Returns the raw SVG data for the image on success, or NULL on error; call SDL_GetError() for details.
This can be used if the caller intends to render its own images from SVG-format data. Most apps will use ControllerImage_CreateSurfaceForAxis(), instead, which will handle generating the pixels internally.
This returns NULL on error, but also if there is no artwork available. For a controller missing a button, this is not necessarily an error. If the distinction is important, consider calling ControllerImage_DeviceHasArtworkForButton().
The returned string (SVG files are text-based XML files) is owned by
ControllerImage, not the caller, and should not be free'd. The pointer
remains valid until device is destroyed.
This function is not thread safe.
This function is available since ControllerImage 1.0.0.