diff options
author | Carl Worth <cworth@cworth.org> | 2008-09-16 17:04:38 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-09-18 07:56:43 -0700 |
commit | 1b42bc8033bc4682c9688086c08ca3ad306a2ae8 (patch) | |
tree | eac1560981d3ef5831695139cbd81f8d4820a47e | |
parent | 0ab14a6b218097721535e1d6d9b3341b7336bb70 (diff) |
Make the lcd_filter API private
During the cairo summit it was decided that this API is to freetype-
specific to be in the general cairo interface for now. This will
likely come back again soon as a cairo_ft-specific interface.
-rw-r--r-- | doc/public/tmpl/cairo-font-options.sgml | 29 | ||||
-rw-r--r-- | src/cairo-font-options.c | 11 | ||||
-rw-r--r-- | src/cairo-types-private.h | 25 | ||||
-rw-r--r-- | src/cairo-xlib-screen.c | 2 | ||||
-rw-r--r-- | src/cairo.h | 28 | ||||
-rw-r--r-- | src/cairoint.h | 8 | ||||
-rw-r--r-- | test/font-options.c | 4 | ||||
-rw-r--r-- | test/text-antialias-subpixel.c | 1 |
8 files changed, 38 insertions, 70 deletions
diff --git a/doc/public/tmpl/cairo-font-options.sgml b/doc/public/tmpl/cairo-font-options.sgml index 62a6b309..501abf41 100644 --- a/doc/public/tmpl/cairo-font-options.sgml +++ b/doc/public/tmpl/cairo-font-options.sgml @@ -137,35 +137,6 @@ output on a particular display. @Returns: -<!-- ##### ENUM cairo_lcd_filter_t ##### --> -<para> - -</para> - -@CAIRO_LCD_FILTER_DEFAULT: -@CAIRO_LCD_FILTER_NONE: -@CAIRO_LCD_FILTER_INTRA_PIXEL: -@CAIRO_LCD_FILTER_FIR3: -@CAIRO_LCD_FILTER_FIR5: - -<!-- ##### FUNCTION cairo_font_options_set_lcd_filter ##### --> -<para> - -</para> - -@options: -@lcd_filter: - - -<!-- ##### FUNCTION cairo_font_options_get_lcd_filter ##### --> -<para> - -</para> - -@options: -@Returns: - - <!-- ##### ENUM cairo_hint_style_t ##### --> <para> diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c index b3fb2748..64a89110 100644 --- a/src/cairo-font-options.c +++ b/src/cairo-font-options.c @@ -335,7 +335,7 @@ cairo_font_options_get_subpixel_order (const cairo_font_options_t *options) } /** - * cairo_font_options_set_lcd_filter: + * _cairo_font_options_set_lcd_filter: * @options: a #cairo_font_options_t * @lcd_filter: the new LCD filter * @@ -347,18 +347,17 @@ cairo_font_options_get_subpixel_order (const cairo_font_options_t *options) * Since: 1.8 **/ void -cairo_font_options_set_lcd_filter (cairo_font_options_t *options, - cairo_lcd_filter_t lcd_filter) +_cairo_font_options_set_lcd_filter (cairo_font_options_t *options, + cairo_lcd_filter_t lcd_filter) { if (cairo_font_options_status (options)) return; options->lcd_filter = lcd_filter; } -slim_hidden_def (cairo_font_options_set_lcd_filter); /** - * cairo_font_options_get_lcd_filter: + * _cairo_font_options_get_lcd_filter: * @options: a #cairo_font_options_t * * Gets the LCD filter for the font options object. @@ -369,7 +368,7 @@ slim_hidden_def (cairo_font_options_set_lcd_filter); * Since: 1.8 **/ cairo_lcd_filter_t -cairo_font_options_get_lcd_filter (const cairo_font_options_t *options) +_cairo_font_options_get_lcd_filter (const cairo_font_options_t *options) { if (cairo_font_options_status ((cairo_font_options_t *) options)) return CAIRO_LCD_FILTER_DEFAULT; diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h index c2d962de..006aec07 100644 --- a/src/cairo-types-private.h +++ b/src/cairo-types-private.h @@ -115,6 +115,31 @@ struct _cairo_array { cairo_bool_t is_snapshot; }; + +/** + * cairo_lcd_filter_t: + * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for + * font backend and target device + * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering + * @CAIRO_LCD_FILTER_INTRA_PIXEL: Intra-pixel filter + * @CAIRO_LCD_FILTER_FIR3: FIR filter with a 3x3 kernel + * @CAIRO_LCD_FILTER_FIR5: FIR filter with a 5x5 kernel + * + * The LCD filter specifies the low-pass filter applied to LCD-optimized + * bitmaps generated with an antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL. + * + * Note: This API was temporarily made available in the public + * interface during the 1.7.x development series, but was made private + * before 1.8. + **/ +typedef enum _cairo_lcd_filter { + CAIRO_LCD_FILTER_DEFAULT, + CAIRO_LCD_FILTER_NONE, + CAIRO_LCD_FILTER_INTRA_PIXEL, + CAIRO_LCD_FILTER_FIR3, + CAIRO_LCD_FILTER_FIR5 +} cairo_lcd_filter_t; + struct _cairo_font_options { cairo_antialias_t antialias; cairo_subpixel_order_t subpixel_order; diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c index 4a26eee5..37e34188 100644 --- a/src/cairo-xlib-screen.c +++ b/src/cairo-xlib-screen.c @@ -278,7 +278,7 @@ _cairo_xlib_init_screen_font_options (Display *dpy, cairo_xlib_screen_info_t *in cairo_font_options_set_hint_style (&info->font_options, hint_style); cairo_font_options_set_antialias (&info->font_options, antialias); cairo_font_options_set_subpixel_order (&info->font_options, subpixel_order); - cairo_font_options_set_lcd_filter (&info->font_options, lcd_filter); + _cairo_font_options_set_lcd_filter (&info->font_options, lcd_filter); cairo_font_options_set_hint_metrics (&info->font_options, CAIRO_HINT_METRICS_ON); } diff --git a/src/cairo.h b/src/cairo.h index ad6d5b5c..6758a4d0 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -1042,28 +1042,6 @@ typedef enum _cairo_subpixel_order { } cairo_subpixel_order_t; /** - * cairo_lcd_filter_t: - * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for - * font backend and target device - * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering - * @CAIRO_LCD_FILTER_INTRA_PIXEL: Intra-pixel filter - * @CAIRO_LCD_FILTER_FIR3: FIR filter with a 3x3 kernel - * @CAIRO_LCD_FILTER_FIR5: FIR filter with a 5x5 kernel - * - * The LCD filter specifies the low-pass filter applied to LCD-optimized - * bitmaps generated with an antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL. - * - * Since: 1.8 - **/ -typedef enum _cairo_lcd_filter { - CAIRO_LCD_FILTER_DEFAULT, - CAIRO_LCD_FILTER_NONE, - CAIRO_LCD_FILTER_INTRA_PIXEL, - CAIRO_LCD_FILTER_FIR3, - CAIRO_LCD_FILTER_FIR5 -} cairo_lcd_filter_t; - -/** * cairo_hint_style_t: * @CAIRO_HINT_STYLE_DEFAULT: Use the default hint style for * font backend and target device @@ -1169,12 +1147,6 @@ cairo_public cairo_subpixel_order_t cairo_font_options_get_subpixel_order (const cairo_font_options_t *options); cairo_public void -cairo_font_options_set_lcd_filter (cairo_font_options_t *options, - cairo_lcd_filter_t lcd_filter); -cairo_public cairo_lcd_filter_t -cairo_font_options_get_lcd_filter (const cairo_font_options_t *options); - -cairo_public void cairo_font_options_set_hint_style (cairo_font_options_t *options, cairo_hint_style_t hint_style); cairo_public cairo_hint_style_t diff --git a/src/cairoint.h b/src/cairoint.h index 0f10bd89..da57c3e6 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -1342,6 +1342,13 @@ cairo_private void _cairo_font_options_init_copy (cairo_font_options_t *options, const cairo_font_options_t *other); +cairo_private void +_cairo_font_options_set_lcd_filter (cairo_font_options_t *options, + cairo_lcd_filter_t lcd_filter); + +cairo_private cairo_lcd_filter_t +_cairo_font_options_get_lcd_filter (const cairo_font_options_t *options); + /* cairo-hull.c */ cairo_private cairo_status_t _cairo_hull_compute (cairo_pen_vertex_t *vertices, int *num_vertices); @@ -2375,7 +2382,6 @@ slim_hidden_proto (cairo_font_options_merge); slim_hidden_proto (cairo_font_options_set_antialias); slim_hidden_proto (cairo_font_options_set_hint_metrics); slim_hidden_proto (cairo_font_options_set_hint_style); -slim_hidden_proto (cairo_font_options_set_lcd_filter); slim_hidden_proto (cairo_font_options_set_subpixel_order); slim_hidden_proto (cairo_font_options_status); slim_hidden_proto (cairo_get_current_point); diff --git a/test/font-options.c b/test/font-options.c index 90c7441b..fd61a73e 100644 --- a/test/font-options.c +++ b/test/font-options.c @@ -70,10 +70,6 @@ main (void) cairo_font_options_get_subpixel_order (NULL); assert (cairo_font_options_get_subpixel_order (default_options) == CAIRO_SUBPIXEL_ORDER_DEFAULT); - cairo_font_options_set_lcd_filter (NULL, CAIRO_LCD_FILTER_DEFAULT); - cairo_font_options_get_lcd_filter (NULL); - assert (cairo_font_options_get_lcd_filter (default_options) == CAIRO_LCD_FILTER_DEFAULT); - cairo_font_options_set_hint_style (NULL, CAIRO_HINT_STYLE_DEFAULT); cairo_font_options_get_hint_style (NULL); assert (cairo_font_options_get_hint_style (default_options) == CAIRO_HINT_STYLE_DEFAULT); diff --git a/test/text-antialias-subpixel.c b/test/text-antialias-subpixel.c index a9989973..a92d64f9 100644 --- a/test/text-antialias-subpixel.c +++ b/test/text-antialias-subpixel.c @@ -57,7 +57,6 @@ draw (cairo_t *cr, int width, int height) cairo_get_font_options (cr, font_options); cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL); cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_RGB); - cairo_font_options_set_lcd_filter (font_options, CAIRO_LCD_FILTER_NONE); cairo_set_font_options (cr, font_options); cairo_font_options_destroy (font_options); |