cairo_matrix_t *t = cairo_matrix_create(); matrix.FillInCairoMatrix(t); cairo_pattern_set_matrix(mPattern, t); cairo_matrix_destroy(t);
cairo_matrix_t mat = matrix.ToCairoMatrix(); cairo_pattern_set_matrix(mPattern, &mat);
    void SetMatrix(const gfxMatrix& matrix) {        cairo_matrix_t *t = cairo_matrix_create();        matrix.FillInCairoMatrix(t);        cairo_pattern_set_matrix(mPattern, t); // this does a copy        cairo_matrix_destroy(t);    }