20#include <SDL3/SDL_video.h>
22#include <Objectively/Resource.h>
32typedef struct ImageInterface ImageInterface;
73struct ImageInterface {
78 ObjectInterface objectInterface;
90 Image *(*imageWithBytes)(
const uint8_t *bytes,
size_t length,
float pixelDensity);
101 Image *(*imageWithData)(
const Data *data,
float pixelDensity);
112 Image *(*imageWithResource)(
const Resource *resource,
float pixelDensity);
123 Image *(*imageWithResourceName)(
const char *
name,
float pixelDensity);
135 Image *(*imageWithSVG)(
const uint8_t *bytes,
size_t length,
float scale);
145 Image *(*imageWithSurface)(SDL_Surface *surface);
157 Image *(*initWithBytes)(
Image *self,
const uint8_t *bytes,
size_t length,
float pixelDensity);
168 Image *(*initWithData)(
Image *self,
const Data *data,
float pixelDensity);
179 Image *(*initWithResource)(
Image *self,
const Resource *resource,
float pixelDensity);
197 Image *(*initWithResourceName)(
Image *self,
const char *
name,
float pixelDensity);
210 Image *(*initWithSVG)(
Image *self,
const uint8_t *bytes,
size_t length,
float scale);
224 Image *(*initWithSVGSize)(
Image *self,
const uint8_t *bytes,
size_t length, SDL_Size points,
float pixelDensity);
238 Image *(*initWithSurface)(
Image *self, SDL_Surface *surface);
246 SDL_Size (*size)(
const Image *self);
static String * name(const Font *self)
OBJECTIVELYMVC_EXPORT Class * _Image(void)
ObjectivelyMVC base types.
#define OBJECTIVELYMVC_EXPORT
const char * type
The image type, inferred if instantiated with a Resource.
float scale
Pixels of surface per point: 1 for raster images, the requested scale for SVG.
SDL_Surface * surface
The backing surface.
Object object
The superclass.
ImageInterface * interface[0]
The interface type.