mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-24 19:30:10 +01:00
[cairo-pdf-surface] cairo_pattern_set_matrix guarantees invertibility.
Be consistent in asserting that the pattern matrix is inverted successfully and remove a couple of redundant checks.
This commit is contained in:
parent
50ebdda3a9
commit
e24969a94a
1 changed files with 4 additions and 4 deletions
|
|
@ -1439,8 +1439,8 @@ _cairo_pdf_surface_emit_linear_pattern (cairo_pdf_surface_t *surface,
|
|||
|
||||
pat_to_pdf = pattern->base.base.matrix;
|
||||
status = cairo_matrix_invert (&pat_to_pdf);
|
||||
if (status)
|
||||
return status;
|
||||
/* cairo_pattern_set_matrix ensures the matrix is invertible */
|
||||
assert (status == CAIRO_STATUS_SUCCESS);
|
||||
|
||||
cairo_matrix_multiply (&pat_to_pdf, &pat_to_pdf, &surface->cairo_to_pdf);
|
||||
x1 = _cairo_fixed_to_double (pattern->p1.x);
|
||||
|
|
@ -1561,8 +1561,8 @@ _cairo_pdf_surface_emit_radial_pattern (cairo_pdf_surface_t *surface,
|
|||
|
||||
pat_to_pdf = pattern->base.base.matrix;
|
||||
status = cairo_matrix_invert (&pat_to_pdf);
|
||||
if (status)
|
||||
return status;
|
||||
/* cairo_pattern_set_matrix ensures the matrix is invertible */
|
||||
assert (status == CAIRO_STATUS_SUCCESS);
|
||||
|
||||
cairo_matrix_multiply (&pat_to_pdf, &pat_to_pdf, &surface->cairo_to_pdf);
|
||||
x1 = _cairo_fixed_to_double (pattern->c1.x);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue