mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 17:50:21 +01:00
Add a function for copying font options rather than just using direct structure copying.
This commit is contained in:
parent
f79d48640f
commit
fe324c4415
2 changed files with 17 additions and 1 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue