Add a function for copying font options rather than just using direct structure copying.

This commit is contained in:
Carl Worth 2005-11-07 09:26:47 +00:00
parent f79d48640f
commit fe324c4415
2 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2005-11-05 Carl Worth <cworth@cworth.org>
* src/cairo-font-options.c: (_cairo_font_options_init_copy),
(cairo_font_options_copy): Add a function for copying font options
rather than just using direct structure copying.
2005-11-05 Carl Worth <cworth@cworth.org>
* src/cairo-ps-surface.c: (_cairo_ps_surface_show_page),

View file

@ -61,6 +61,16 @@ _cairo_font_options_init_default (cairo_font_options_t *options)
options->hint_metrics = CAIRO_HINT_METRICS_DEFAULT;
}
void
_cairo_font_options_init_copy (cairo_font_options_t *options,
const cairo_font_options_t *other)
{
options->antialias = other->antialias;
options->subpixel_order = other->subpixel_order;
options->hint_style = other->hint_style;
options->hint_metrics = other->hint_metrics;
}
/**
* cairo_font_options_create:
*
@ -107,7 +117,7 @@ cairo_font_options_copy (const cairo_font_options_t *original)
if (!options)
return (cairo_font_options_t *)&cairo_font_options_nil;
*options = *original;
_cairo_font_options_init_copy (options, original);
return options;
}