[cairo-commit] cairo/src cairo-font-options.c,1.2,1.3

Carl Worth commit at pdx.freedesktop.org
Mon Nov 7 09:26:50 PST 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv28862/src

Modified Files:
	cairo-font-options.c 
Log Message:

2005-11-05  Carl Worth  <cworth at 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.


Index: cairo-font-options.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-font-options.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cairo-font-options.c	25 Jul 2005 19:29:24 -0000	1.2
+++ cairo-font-options.c	7 Nov 2005 17:26:48 -0000	1.3
@@ -61,6 +61,16 @@
     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 @@
     if (!options)
 	return (cairo_font_options_t *)&cairo_font_options_nil;
 
-    *options = *original;
+    _cairo_font_options_init_copy (options, original);
 
     return options;
 }



More information about the cairo-commit mailing list