Bug 310381 - support shape-rendering property on cairo. r=jwatt

This commit is contained in:
tor%cs.brown.edu 2005-09-30 19:22:16 +00:00
parent 819f0f556d
commit 7f62504704

View File

@ -296,6 +296,18 @@ nsSVGCairoPathGeometry::Render(nsISVGRendererCanvas *canvas)
return NS_OK;
}
PRUint16 shapeMode;
mSource->GetShapeRendering(&shapeMode);
switch (shapeMode) {
case nsISVGPathGeometrySource::SHAPE_RENDERING_OPTIMIZESPEED:
case nsISVGPathGeometrySource::SHAPE_RENDERING_CRISPEDGES:
cairo_set_antialias(ctx, CAIRO_ANTIALIAS_NONE);
break;
default:
cairo_set_antialias(ctx, CAIRO_ANTIALIAS_DEFAULT);
break;
}
PRUint16 strokeType, fillType;
PRUint16 strokeServerType = 0;