Bug 738688: Add supports for color patterns in the Azure-Thebes wrapper. r=jrmuizel

This commit is contained in:
Bas Schouten 2012-03-29 20:53:43 +02:00
parent f4bf642150
commit c367e0d9b4

View File

@ -159,6 +159,14 @@ gfxPattern::GetPattern(mozilla::gfx::DrawTarget *aTarget)
GraphicsExtend extend = (GraphicsExtend)cairo_pattern_get_extend(mPattern); GraphicsExtend extend = (GraphicsExtend)cairo_pattern_get_extend(mPattern);
switch (cairo_pattern_get_type(mPattern)) { switch (cairo_pattern_get_type(mPattern)) {
case CAIRO_PATTERN_TYPE_SOLID:
{
double r, g, b, a;
cairo_pattern_get_rgba(mPattern, &r, &g, &b, &a);
new (mColorPattern.addr()) ColorPattern(Color(r, g, b, a));
return mColorPattern.addr();
}
case CAIRO_PATTERN_TYPE_SURFACE: case CAIRO_PATTERN_TYPE_SURFACE:
{ {
GraphicsFilter filter = (GraphicsFilter)cairo_pattern_get_filter(mPattern); GraphicsFilter filter = (GraphicsFilter)cairo_pattern_get_filter(mPattern);