Skip to content

Commit

Permalink
types: Move cairo_scaled_glyph_t to cairo-types-private.h
Browse files Browse the repository at this point in the history
Another step in bringing some sanity to our headers.
  • Loading branch information
Chris Wilson committed Jan 22, 2010
1 parent 9c98656 commit 05bb43a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
25 changes: 25 additions & 0 deletions src/cairo-types-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,4 +396,29 @@ typedef union {
cairo_gradient_pattern_union_t gradient;
} cairo_pattern_union_t;

/*
* A #cairo_unscaled_font_t is just an opaque handle we use in the
* glyph cache.
*/
typedef struct _cairo_unscaled_font {
cairo_hash_entry_t hash_entry;
cairo_reference_count_t ref_count;
const cairo_unscaled_font_backend_t *backend;
} cairo_unscaled_font_t;

typedef struct _cairo_scaled_glyph {
cairo_hash_entry_t hash_entry;

cairo_text_extents_t metrics; /* user-space metrics */
cairo_text_extents_t fs_metrics; /* font-space metrics */
cairo_box_t bbox; /* device-space bounds */
int16_t x_advance; /* device-space rounded X advance */
int16_t y_advance; /* device-space rounded Y advance */

cairo_image_surface_t *surface; /* device-space image */
cairo_path_fixed_t *path; /* device-space outline */
cairo_surface_t *recording_surface; /* device-space recording-surface */

void *surface_private; /* for the surface backend */
} cairo_scaled_glyph_t;
#endif /* CAIRO_TYPES_PRIVATE_H */
26 changes: 0 additions & 26 deletions src/cairoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,32 +371,6 @@ _cairo_hash_bytes (unsigned long hash,
const void *bytes,
unsigned int length);

/*
* A #cairo_unscaled_font_t is just an opaque handle we use in the
* glyph cache.
*/
typedef struct _cairo_unscaled_font {
cairo_hash_entry_t hash_entry;
cairo_reference_count_t ref_count;
const cairo_unscaled_font_backend_t *backend;
} cairo_unscaled_font_t;

typedef struct _cairo_scaled_glyph {
cairo_hash_entry_t hash_entry;

cairo_text_extents_t metrics; /* user-space metrics */
cairo_text_extents_t fs_metrics; /* font-space metrics */
cairo_box_t bbox; /* device-space bounds */
int16_t x_advance; /* device-space rounded X advance */
int16_t y_advance; /* device-space rounded Y advance */

cairo_image_surface_t *surface; /* device-space image */
cairo_path_fixed_t *path; /* device-space outline */
cairo_surface_t *recording_surface; /* device-space recording-surface */

void *surface_private; /* for the surface backend */
} cairo_scaled_glyph_t;

#define _cairo_scaled_glyph_index(g) ((g)->hash_entry.hash)
#define _cairo_scaled_glyph_set_index(g, i) ((g)->hash_entry.hash = (i))

Expand Down

0 comments on commit 05bb43a

Please sign in to comment.