43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
/* Generated by k2c from runtime/image_props.kry. */
|
|
#ifndef K_RUNTIME_IMAGE_PROPS_H
|
|
#define K_RUNTIME_IMAGE_PROPS_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#ifndef KIR_STRING_VALUE_DEFINED
|
|
#define KIR_STRING_VALUE_DEFINED
|
|
#include <stddef.h>
|
|
#include <string.h>
|
|
/* Immutable borrowed UTF-8 bytes; length preserves embedded nulls. */
|
|
typedef struct String { const char *data; size_t length; } String;
|
|
static inline String StringView(const char *data, size_t length) {
|
|
String value = {data, length};
|
|
return value;
|
|
}
|
|
static inline bool StringEqual(String a, String b) {
|
|
return a.length == b.length && (a.length == 0 || memcmp(a.data, b.data, a.length) == 0);
|
|
}
|
|
#endif
|
|
#include "kryon_compat.generated.h"
|
|
|
|
typedef enum ImageFit {
|
|
ImageFitStretch = 0,
|
|
ImageFitContain = 1,
|
|
ImageFitCover = 2,
|
|
} ImageFit;
|
|
|
|
typedef struct ImageProps {
|
|
const char* asset_path;
|
|
const char* alt_text;
|
|
Rectangle bounds;
|
|
Rectangle source;
|
|
Vector2 origin;
|
|
float rotation;
|
|
Color tint;
|
|
ImageFit fit;
|
|
int32_t class_name;
|
|
} ImageProps;
|
|
|
|
#endif /* K_RUNTIME_IMAGE_PROPS_H */
|