cairo_matrix_t inverse = matrix; if (cairo_matrix_invert(&inverse)) return NS_ERROR_FAILURE;
nsSVGCairoCanvas::SetClipRect(nsIDOMSVGMatrix *aCTM, float aX, float aY,                              float aWidth, float aHeight){  if (!aCTM)    return NS_ERROR_FAILURE;  float m[6];  float val;  aCTM->GetA(&val);  m[0] = val;      aCTM->GetB(&val);  m[1] = val;      aCTM->GetC(&val);    m[2] = val;        aCTM->GetD(&val);    m[3] = val;      aCTM->GetE(&val);  m[4] = val;    aCTM->GetF(&val);  m[5] = val;  cairo_matrix_t oldMatrix;  cairo_get_matrix(mCR, &oldMatrix);  cairo_matrix_t matrix = {m[0], m[1], m[2], m[3], m[4], m[5]};  cairo_transform(mCR, &matrix);  cairo_new_path(mCR);  cairo_rectangle(mCR, aX, aY, aWidth, aHeight);  cairo_clip(mCR);  cairo_new_path(mCR);  cairo_set_matrix(mCR, &oldMatrix);  return NS_OK;}