summaryrefslogtreecommitdiffstats
path: root/libass/ass_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'libass/ass_cache.h')
-rw-r--r--libass/ass_cache.h33
1 files changed, 3 insertions, 30 deletions
diff --git a/libass/ass_cache.h b/libass/ass_cache.h
index 59ac8cee2a..863ba6fdf6 100644
--- a/libass/ass_cache.h
+++ b/libass/ass_cache.h
@@ -33,25 +33,9 @@ void* ass_font_cache_add(ass_font_t* font);
void ass_font_cache_done(void);
-// describes a bitmap; bitmaps with equivalents structs are considered identical
-typedef struct bitmap_hash_key_s {
- char bitmap; // bool : true = bitmap, false = outline
- ass_font_t* font;
- double size; // font size
- uint32_t ch; // character code
- unsigned outline; // border width, 16.16 fixed point value
- int bold, italic;
- char be; // blur edges
- double blur; // gaussian blur
-
- unsigned scale_x, scale_y; // 16.16
- int frx, fry, frz; // signed 16.16
- int shift_x, shift_y; // shift vector that was added to glyph before applying rotation
- // = 0, if frx = fry = frx = 0
- // = (glyph base point) - (rotation origin), otherwise
-
- FT_Vector advance; // subpixel shift vector
-} bitmap_hash_key_t;
+// Create definitions for bitmap_hash_key and glyph_hash_key
+#define CREATE_STRUCT_DEFINITIONS
+#include "ass_cache_template.c"
typedef struct bitmap_hash_val_s {
bitmap_t* bm; // the actual bitmaps
@@ -86,17 +70,6 @@ void ass_composite_cache_reset(void);
void ass_composite_cache_done(void);
-// describes an outline glyph
-typedef struct glyph_hash_key_s {
- ass_font_t* font;
- double size; // font size
- uint32_t ch; // character code
- int bold, italic;
- unsigned scale_x, scale_y; // 16.16
- FT_Vector advance; // subpixel shift vector
- unsigned outline; // border width, 16.16
-} glyph_hash_key_t;
-
typedef struct glyph_hash_val_s {
FT_Glyph glyph;
FT_Glyph outline_glyph;