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.
This commit is contained in:
Carl Worth 2008-09-16 17:04:38 -07:00
parent 0ab14a6b21
commit 1b42bc8033
8 changed files with 38 additions and 70 deletions

View file

@ -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>

View file

@ -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;

View file

@ -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;

View file

@ -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);
}

View file

@ -1041,28 +1041,6 @@ typedef enum _cairo_subpixel_order {
CAIRO_SUBPIXEL_ORDER_VBGR
} 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
@ -1168,12 +1146,6 @@ cairo_font_options_set_subpixel_order (cairo_font_options_t *options,
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);

View file

@ -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);

View file

@ -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);

View file

@ -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);