#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include "../EZ_utils.h"
Go to the source code of this file.
◆ EZ_list_element
◆ EZ_create_image()
EZ_list * EZ_create_image |
( |
SDL_Surface * | surface, |
|
|
SDL_Renderer * | renderer, |
|
|
anchore_point | dst_anchore, |
|
|
int | auto_aspect ) |
Creates an EZ_image from an SDL_Surface.
This function creates an EZ_image structure from the given SDL_Surface and renderer. The created EZ_image can be used for rendering with SDL.
- Parameters
-
surface | The SDL_Surface to create the image from. |
renderer | The SDL_Renderer to use for creating the texture. |
dst_anchore | The anchore point for the destination. |
auto_aspect | If non-zero, the aspect ratio of the image will be maintained. |
- Returns
- A pointer to the created EZ_image structure.
- Return values
-
NULL | if the texture could not be created from the surface. |