gradCBPath, GetFill());
mSource, gradCBFill, this);
nsSVGGDIPlusPathGeometry::Render(nsISVGRendererCanvas *canvas){  nsCOMPtr<nsISVGGDIPlusCanvas> gdiplusCanvas = do_QueryInterface(canvas);  NS_ASSERTION(gdiplusCanvas, "wrong svg render context for geometry!");  if (!gdiplusCanvas) return NS_ERROR_FAILURE;  PRUint16 canvasRenderMode;  canvas->GetRenderMode(&canvasRenderMode);  if (canvasRenderMode == nsISVGRendererCanvas::SVG_RENDER_MODE_CLIP) {    Region *region = gdiplusCanvas->GetClipRegion();    GraphicsPath *path = GetFill();    PRUint16 rule;    mSource->GetClipRule(&rule);    if (rule == nsISVGGeometrySource::FILL_RULE_EVENODD)      path->SetFillMode(FillModeAlternate);    else      path->SetFillMode(FillModeWinding);    region->Union(path);    return NS_OK;  }  PRUint16 renderingMode;  mSource->GetShapeRendering(&renderingMode);  switch (renderingMode) {    case nsISVGPathGeometrySource::SHAPE_RENDERING_OPTIMIZESPEED:    case nsISVGPathGeometrySource::SHAPE_RENDERING_CRISPEDGES:      gdiplusCanvas->GetGraphics()->SetSmoothingMode(SmoothingModeNone);      break;    default:      gdiplusCanvas->GetGraphics()->SetSmoothingMode(SmoothingModeAntiAlias);      break;  }    gdiplusCanvas->GetGraphics()->SetCompositingQuality(CompositingQualityHighSpeed);//  gdiplusCanvas->GetGraphics()->SetPixelOffsetMode(PixelOffsetModeHalf);  nscolor color;  float opacity;  PRUint16 type;    // paint fill:  mSource->GetFillPaintType(&type);  if (type != nsISVGGeometrySource::PAINT_TYPE_NONE && GetFill()) {    if (type == nsISVGGeometrySource::PAINT_TYPE_SOLID_COLOR) {      mSource->GetFillPaint(&color);      mSource->GetFillOpacity(&opacity);      RenderPath(GetFill(), color, opacity, gdiplusCanvas);    } else {      nsCOMPtr<nsISVGGradient> aGrad;      mSource->GetFillGradient(getter_AddRefs(aGrad));      nsCOMPtr<nsISVGRendererRegion> region;      GetCoveredRegion(getter_AddRefs(region));      nsCOMPtr<nsISVGGDIPlusRegion> aRegion = do_QueryInterface(region);      nsCOMPtr<nsIDOMSVGMatrix> ctm;      mSource->GetCanvasTM(getter_AddRefs(ctm));      GDIPlusGradient(aRegion, aGrad, ctm, gdiplusCanvas->GetGraphics(),                      gradCBPath, GetFill());    }  }  // paint stroke:  mSource->GetStrokePaintType(&type);  if (type != nsISVGGeometrySource::PAINT_TYPE_NONE && GetStroke()) {    if (type == nsISVGGeometrySource::PAINT_TYPE_SOLID_COLOR) {      mSource->GetStrokePaint(&color);      mSource->GetStrokeOpacity(&opacity);      RenderPath(GetStroke(), color, opacity, gdiplusCanvas);    } else {      nsCOMPtr<nsISVGGradient> aGrad;      mSource->GetStrokeGradient(getter_AddRefs(aGrad));      nsCOMPtr<nsISVGRendererRegion> region;      GetCoveredRegion(getter_AddRefs(region));      nsCOMPtr<nsISVGGDIPlusRegion> aRegion = do_QueryInterface(region);      nsCOMPtr<nsIDOMSVGMatrix> ctm;      mSource->GetCanvasTM(getter_AddRefs(ctm));      GDIPlusGradient(aRegion, aGrad, ctm, gdiplusCanvas->GetGraphics(),                      gradCBPath, GetStroke());    }  }    return NS_OK;}