third_party/cairo/src/cairo-pattern.c
cairo_bool_t
_cairo_pattern_is_opaque (const cairo_pattern_t *abstract_pattern,
			  const cairo_rectangle_int_t *sample)
{
    const cairo_pattern_union_t *pattern;

    if (abstract_pattern->has_component_alpha)
	return FALSE;

    pattern = (cairo_pattern_union_t *) abstract_pattern;
    switch (pattern->base.type) {
    case CAIRO_PATTERN_TYPE_SOLID:
	return _cairo_pattern_is_opaque_solid (abstract_pattern);
    case CAIRO_PATTERN_TYPE_SURFACE:
	return _surface_is_opaque (&pattern->surface, sample);
    case CAIRO_PATTERN_TYPE_RASTER_SOURCE:
	return _raster_source_is_opaque (&pattern->raster_source, sample);
    case CAIRO_PATTERN_TYPE_LINEAR:
    case CAIRO_PATTERN_TYPE_RADIAL:
	return _gradient_is_opaque (&pattern->gradient.base, sample);
    case CAIRO_PATTERN_TYPE_MESH:
	return FALSE;
    }

    ASSERT_NOT_REACHED;
    return FALSE;
}
/**
 * _cairo_pattern_is_opaque:
 *
 * Convenience function to determine whether a pattern is an opaque
 * pattern (of any type). The same caveats that apply to
 * _cairo_pattern_is_opaque_solid apply here as well.
 *
 * Return value: %TRUE if the pattern is a opaque.
 **/
Convenience function to determine whether a pattern is an opaque
pattern (of any type). The same caveats that apply to
_cairo_pattern_is_opaque_solid apply here as well.

Return value: %TRUE if the pattern is a opaque.
Convenience function to determine whether a pattern is an opaque pattern ( of any type ) . The same caveats that apply to _cairo_pattern_is_opaque_solid apply here as well . Return value : %TRUE if the pattern is a opaque .
cairo_bool_t
_cairo_pattern_is_opaque (const cairo_pattern_t *abstract_pattern,
			  const cairo_rectangle_int_t *sample)
{
    const cairo_pattern_union_t *pattern;
    if (abstract_pattern->has_component_alpha)
	return FALSE;
    pattern = (cairo_pattern_union_t *) abstract_pattern;
    switch (pattern->base.type) {
    case CAIRO_PATTERN_TYPE_SOLID:
	return _cairo_pattern_is_opaque_solid (abstract_pattern);
    case CAIRO_PATTERN_TYPE_SURFACE:
	return _surface_is_opaque (&pattern->surface, sample);
    case CAIRO_PATTERN_TYPE_RASTER_SOURCE:
	return _raster_source_is_opaque (&pattern->raster_source, sample);
    case CAIRO_PATTERN_TYPE_LINEAR:
    case CAIRO_PATTERN_TYPE_RADIAL:
	return _gradient_is_opaque (&pattern->gradient.base, sample);
    case CAIRO_PATTERN_TYPE_MESH:
	return FALSE;
    }
    ASSERT_NOT_REACHED;
    return FALSE;
}
cairo_bool_t _cairo_pattern_is_opaque ( const cairo_pattern_t * abstract_pattern , const cairo_rectangle_int_t * sample ) { const cairo_pattern_union_t * pattern ; if ( abstract_pattern -> has_component_alpha ) return FALSE ; pattern = ( cairo_pattern_union_t * ) abstract_pattern ; switch ( pattern -> base . type ) { case CAIRO_PATTERN_TYPE_SOLID : return _cairo_pattern_is_opaque_solid ( abstract_pattern ) ; case CAIRO_PATTERN_TYPE_SURFACE : return _surface_is_opaque ( & pattern -> surface , sample ) ; case CAIRO_PATTERN_TYPE_RASTER_SOURCE : return _raster_source_is_opaque ( & pattern -> raster_source , sample ) ; case CAIRO_PATTERN_TYPE_LINEAR : case CAIRO_PATTERN_TYPE_RADIAL : return _gradient_is_opaque ( & pattern -> gradient . base , sample ) ; case CAIRO_PATTERN_TYPE_MESH : return FALSE ; } ASSERT_NOT_REACHED ; return FALSE ; }
_cairo_pattern_is_opaque:
 Convenience function to determine whether a pattern is an opaque
 pattern (of any type).
_cairo_pattern_is_opaque : Convenience function to determine whether a pattern is an opaque pattern ( of any type ) .