Rename is_userfont_foreground to is_foreground_marker

as it is used by FT as well as user fonts.
This commit is contained in:
Adrian Johnson 2023-01-27 20:05:15 +10:30
parent 9e59808ecb
commit bdf97dd2a1
5 changed files with 17 additions and 17 deletions

View file

@ -1145,7 +1145,7 @@ _cairo_gstate_mask (cairo_gstate_t *gstate,
}
_cairo_gstate_copy_transformed_mask (gstate, &mask_pattern.base, mask);
if (source->type == CAIRO_PATTERN_TYPE_SOLID && !source->is_userfont_foreground &&
if (source->type == CAIRO_PATTERN_TYPE_SOLID && !source->is_foreground_marker &&
mask_pattern.base.type == CAIRO_PATTERN_TYPE_SOLID &&
_cairo_operator_bounded_by_source (op))
{

View file

@ -72,7 +72,7 @@ struct _cairo_pattern {
cairo_filter_t filter;
cairo_extend_t extend;
cairo_bool_t has_component_alpha;
cairo_bool_t is_userfont_foreground;
cairo_bool_t is_foreground_marker;
cairo_matrix_t matrix;
double opacity;

View file

@ -76,7 +76,7 @@ static const cairo_solid_pattern_t _cairo_pattern_nil = {
CAIRO_FILTER_DEFAULT, /* filter */
CAIRO_EXTEND_GRADIENT_DEFAULT, /* extend */
FALSE, /* has component alpha */
FALSE, /* is_userfont_foreground */
FALSE, /* is_foreground_marker */
{ 1., 0., 0., 1., 0., 0., }, /* matrix */
1.0 /* opacity */
}
@ -93,7 +93,7 @@ static const cairo_solid_pattern_t _cairo_pattern_nil_null_pointer = {
CAIRO_FILTER_DEFAULT, /* filter */
CAIRO_EXTEND_GRADIENT_DEFAULT, /* extend */
FALSE, /* has component alpha */
FALSE, /* is_userfont_foreground */
FALSE, /* is_foreground_marker */
{ 1., 0., 0., 1., 0., 0., }, /* matrix */
1.0 /* opacity */
}
@ -110,7 +110,7 @@ const cairo_solid_pattern_t _cairo_pattern_black = {
CAIRO_FILTER_NEAREST, /* filter */
CAIRO_EXTEND_REPEAT, /* extend */
FALSE, /* has component alpha */
FALSE, /* is_userfont_foreground */
FALSE, /* is_foreground_marker */
{ 1., 0., 0., 1., 0., 0., }, /* matrix */
1.0 /* opacity */
},
@ -128,7 +128,7 @@ const cairo_solid_pattern_t _cairo_pattern_clear = {
CAIRO_FILTER_NEAREST, /* filter */
CAIRO_EXTEND_REPEAT, /* extend */
FALSE, /* has component alpha */
FALSE, /* is_userfont_foreground */
FALSE, /* is_foreground_marker */
{ 1., 0., 0., 1., 0., 0., }, /* matrix */
1.0 /* opacity */
},
@ -146,7 +146,7 @@ const cairo_solid_pattern_t _cairo_pattern_white = {
CAIRO_FILTER_NEAREST, /* filter */
CAIRO_EXTEND_REPEAT, /* extend */
FALSE, /* has component alpha */
FALSE, /* is_userfont_foreground */
FALSE, /* is_foreground_marker */
{ 1., 0., 0., 1., 0., 0., }, /* matrix */
1.0 /* opacity */
},
@ -238,7 +238,7 @@ _cairo_pattern_init (cairo_pattern_t *pattern, cairo_pattern_type_t type)
pattern->opacity = 1.0;
pattern->has_component_alpha = FALSE;
pattern->is_userfont_foreground = FALSE;
pattern->is_foreground_marker = FALSE;
cairo_matrix_init_identity (&pattern->matrix);
@ -628,7 +628,7 @@ cairo_pattern_t *
_cairo_pattern_create_foreground_marker (void)
{
cairo_pattern_t *pattern = _cairo_pattern_create_solid (CAIRO_COLOR_BLACK);
pattern->is_userfont_foreground = TRUE;
pattern->is_foreground_marker = TRUE;
return pattern;
}

View file

@ -2706,7 +2706,7 @@ print_pattern (FILE *file,
switch (pattern->type) {
case CAIRO_PATTERN_TYPE_SOLID: {
cairo_solid_pattern_t *p = (cairo_solid_pattern_t *) pattern;
if (pattern->is_userfont_foreground) {
if (pattern->is_foreground_marker) {
fprintf (file, "solid foreground\n");
} else {
fprintf (file, "solid rgba: %f %f %f %f\n",

View file

@ -2204,7 +2204,7 @@ _cairo_surface_paint (cairo_surface_t *surface,
if (unlikely (status))
return status;
if (source->is_userfont_foreground && surface->foreground_source) {
if (source->is_foreground_marker && surface->foreground_source) {
source = surface->foreground_source;
surface->foreground_used = TRUE;
}
@ -2259,7 +2259,7 @@ _cairo_surface_mask (cairo_surface_t *surface,
if (unlikely (status))
return status;
if (source->is_userfont_foreground && surface->foreground_source) {
if (source->is_foreground_marker && surface->foreground_source) {
source = surface->foreground_source;
surface->foreground_used = TRUE;
}
@ -2320,12 +2320,12 @@ _cairo_surface_fill_stroke (cairo_surface_t *surface,
if (unlikely (status))
return status;
if (fill_source->is_userfont_foreground && surface->foreground_source) {
if (fill_source->is_foreground_marker && surface->foreground_source) {
fill_source = surface->foreground_source;
surface->foreground_used = TRUE;
}
if (stroke_source->is_userfont_foreground && surface->foreground_source) {
if (stroke_source->is_foreground_marker && surface->foreground_source) {
stroke_source = surface->foreground_source;
surface->foreground_used = TRUE;
}
@ -2404,7 +2404,7 @@ _cairo_surface_stroke (cairo_surface_t *surface,
if (unlikely (status))
return status;
if (source->is_userfont_foreground && surface->foreground_source) {
if (source->is_foreground_marker && surface->foreground_source) {
source = surface->foreground_source;
surface->foreground_used = TRUE;
}
@ -2454,7 +2454,7 @@ _cairo_surface_fill (cairo_surface_t *surface,
if (unlikely (status))
return status;
if (source->is_userfont_foreground && surface->foreground_source) {
if (source->is_foreground_marker && surface->foreground_source) {
source = surface->foreground_source;
surface->foreground_used = TRUE;
}
@ -2944,7 +2944,7 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface,
if (unlikely (status))
return status;
if (source->is_userfont_foreground && surface->foreground_source)
if (source->is_foreground_marker && surface->foreground_source)
source = surface->foreground_source;
if (_cairo_scaled_font_has_color_glyphs (scaled_font) &&