aGrad->GetGradientTransform(getter_AddRefs(svgMatrix));
aGrad->GetGradientTransform(getter_AddRefs(svgMatrix), aSource);
CairoGradient(cairo_t *ctx, nsISVGGradient *aGrad, cairo_text_extents_t *extent){  NS_ASSERTION(aGrad, "Called CairoGradient without a gradient!");  if (!aGrad)    return NULL;  // Get the gradientUnits  PRUint16 bbox;  aGrad->GetGradientUnits(&bbox);  cairo_matrix_t *patternMatrix = cairo_matrix_create();  if (bbox == nsIDOMSVGGradientElement::SVG_GRUNITS_OBJECTBOUNDINGBOX) {    // BoundingBox    // We need to calculate this from the Region (Uta?) in    // the object we're filling    double x1, x2, y1, y2;    if (!extent) {      cairo_fill_extents(ctx, &x1, &y1, &x2, &y2);    } else {      x1 = extent->x_bearing;      y1 = extent->y_bearing;      x2 = extent->x_bearing + extent->width;      y2 = extent->y_bearing + extent->height;    }    cairo_matrix_set_affine(patternMatrix, x2 - x1, 0, 0, y2 - y1, x1, y1);  } else {    cairo_matrix_set_identity(patternMatrix);  }  // Get the transform list (if there is one)  nsCOMPtr<nsIDOMSVGMatrix> svgMatrix;  aGrad->GetGradientTransform(getter_AddRefs(svgMatrix));  NS_ASSERTION(svgMatrix, "CairoGradient: GetGradientTransform returns null");  cairo_matrix_t *aTransMatrix =  SVGToMatrix(svgMatrix);  cairo_matrix_multiply(patternMatrix, aTransMatrix, patternMatrix);  cairo_matrix_destroy(aTransMatrix);  cairo_pattern_t *gradient;  // Linear or Radial?  PRUint32 type;  aGrad->GetGradientType(&type);  if (type == nsISVGGradient::SVG_LINEAR_GRADIENT)    gradient = CairoLinearGradient(ctx, aGrad);  else if (type == nsISVGGradient::SVG_RADIAL_GRADIENT)    gradient = CairoRadialGradient(ctx, aGrad);  PRUint16 aSpread;  aGrad->GetSpreadMethod(&aSpread);  if (aSpread == nsIDOMSVGGradientElement::SVG_SPREADMETHOD_PAD)    cairo_pattern_set_extend(gradient, CAIRO_EXTEND_NONE);  else if (aSpread == nsIDOMSVGGradientElement::SVG_SPREADMETHOD_REFLECT)    cairo_pattern_set_extend(gradient, CAIRO_EXTEND_REFLECT);  else if (aSpread == nsIDOMSVGGradientElement::SVG_SPREADMETHOD_REPEAT)    cairo_pattern_set_extend(gradient, CAIRO_EXTEND_REPEAT);    cairo_matrix_invert(patternMatrix);  cairo_pattern_set_matrix(gradient, patternMatrix);  cairo_matrix_destroy(patternMatrix);  CairoSetStops(gradient, aGrad);  return gradient;}