LibartGradient(render, ctm, aGrad, aLibartRegion);
LibartGradient(render, ctm, aGrad, aLibartRegion, mSource);
nsSVGLibartPathGeometry::Render(nsISVGRendererCanvas *canvas){  nsCOMPtr<nsISVGLibartCanvas> libartCanvas = do_QueryInterface(canvas);  NS_ASSERTION(libartCanvas, "wrong svg render context for geometry!");  if (!libartCanvas) return NS_ERROR_FAILURE;  PRUint16 type;    // paint fill:  mSource->GetFillPaintType(&type);  if (type == nsISVGGeometrySource::PAINT_TYPE_SOLID_COLOR && GetFill()) {    nscolor rgb;    mSource->GetFillPaint(&rgb);    float opacity;    mSource->GetFillOpacity(&opacity);    ArtColor col;    libartCanvas->GetArtColor(rgb, col);        ArtRender* render = libartCanvas->NewRender();    NS_ASSERTION(render, "could not create render");#ifdef DEBUG_scooter    printf("nsSVGLibartPathGeometry::Render - opacity=%f\n",opacity);#endif    art_render_mask_solid(render, (int)(0x10000 * opacity));    art_render_svp(render, GetFill());    art_render_image_solid(render, col);    libartCanvas->InvokeRender(render);  } else if (type == nsISVGGeometrySource::PAINT_TYPE_SERVER && GetFill() ) {    // Handle gradients    nsCOMPtr<nsISVGGradient> aGrad;    mSource->GetFillGradient(getter_AddRefs(aGrad));    float opacity;    mSource->GetFillOpacity(&opacity);        ArtRender* render = libartCanvas->NewRender();    NS_ASSERTION(render, "could not create render");    art_render_mask_solid(render, (int)(0x10000 * opacity));    art_render_svp(render, GetFill());    // Now, get the appropriate gradient fill    nsCOMPtr<nsISVGRendererRegion> region;    GetCoveredRegion(getter_AddRefs(region));    nsCOMPtr<nsISVGLibartRegion> aLibartRegion = do_QueryInterface(region);    nsCOMPtr<nsIDOMSVGMatrix> ctm;    mSource->GetCanvasTM(getter_AddRefs(ctm));    LibartGradient(render, ctm, aGrad, aLibartRegion);    // And draw it    libartCanvas->InvokeRender(render);  }  // paint stroke:  mSource->GetStrokePaintType(&type);  if (type == nsISVGGeometrySource::PAINT_TYPE_SOLID_COLOR && GetStroke()) {    nscolor rgb;    mSource->GetStrokePaint(&rgb);    float opacity;    mSource->GetStrokeOpacity(&opacity);    ArtColor col;    libartCanvas->GetArtColor(rgb, col);        ArtRender* render = libartCanvas->NewRender();    NS_ASSERTION(render, "could not create render");    art_render_mask_solid(render, (int)(0x10000 * opacity));    art_render_svp(render, GetStroke());    art_render_image_solid(render, col);    libartCanvas->InvokeRender(render);  } else if (type == nsISVGGeometrySource::PAINT_TYPE_SERVER && GetStroke()) {    // Handle gradients    nsCOMPtr<nsISVGGradient> aGrad;    mSource->GetStrokeGradient(getter_AddRefs(aGrad));    float opacity;    mSource->GetStrokeOpacity(&opacity);        ArtRender* render = libartCanvas->NewRender();    NS_ASSERTION(render, "could not create render");    art_render_mask_solid(render, (int)(0x10000 * opacity));    art_render_svp(render, GetStroke());    // Now, get the appropriate gradient fill    nsCOMPtr<nsISVGRendererRegion> region;    GetCoveredRegion(getter_AddRefs(region));    nsCOMPtr<nsISVGLibartRegion> aLibartRegion = do_QueryInterface(region);    nsCOMPtr<nsIDOMSVGMatrix> ctm;    mSource->GetCanvasTM(getter_AddRefs(ctm));    LibartGradient(render, ctm, aGrad, aLibartRegion);    // And draw it    libartCanvas->InvokeRender(render);  }    return NS_OK;}