GpStatus WINGDIPAPI GdipMultiplyTextureTransform (GpTexture *texture, GpMatrix *matrix, GpMatrixOrder order) { GpStatus status; BOOL invertible = FALSE; cairo_matrix_t mat; if ((texture == NULL) || (matrix == NULL)) { return InvalidParameter; } /* the matrix MUST be invertible to be used */ status = GdipIsMatrixInvertible ((GpMatrix*) matrix, &invertible); if (!invertible || (status != Ok)) return InvalidParameter; if (order == MatrixOrderPrepend) cairo_matrix_multiply (&mat, matrix, &texture->matrix); else if (order == MatrixOrderAppend) cairo_matrix_multiply (&mat, &texture->matrix, matrix); gdip_cairo_matrix_copy (&texture->matrix, &mat); texture->base.changed = TRUE; return status; }
GpStatus WINGDIPAPI GdipSetPenTransform (GpPen *pen, GpMatrix *matrix) { BOOL invertible; if (!pen || !matrix) return InvalidParameter; /* the matrix MUST be invertible to be used */ GdipIsMatrixInvertible (matrix, &invertible); if (!invertible) return InvalidParameter; gdip_cairo_matrix_copy (&pen->matrix, matrix); pen->changed = TRUE; return Ok; }
GpStatus WINGDIPAPI GdipSetTextureTransform (GpTexture *texture, GDIPCONST GpMatrix *matrix) { BOOL invertible; if (!texture || !matrix) return InvalidParameter; GdipIsMatrixInvertible ((GpMatrix *) matrix, &invertible); if (!invertible) return InvalidParameter; gdip_cairo_matrix_copy (&texture->matrix, matrix); texture->base.changed = TRUE; return Ok; }
GpStatus WINGDIPAPI GdipMultiplyPenTransform (GpPen *pen, GpMatrix *matrix, GpMatrixOrder order) { BOOL invertible; if (!pen) return InvalidParameter; if (!matrix) return Ok; /* the matrix MUST be invertible to be used */ GdipIsMatrixInvertible (matrix, &invertible); if (!invertible) return InvalidParameter; if (order == MatrixOrderPrepend) cairo_matrix_multiply (&pen->matrix, matrix, &pen->matrix); else cairo_matrix_multiply (&pen->matrix, &pen->matrix, matrix); pen->changed = TRUE; return Ok; }
GpStatus WINGDIPAPI GdipMultiplyTextureTransform (GpTexture *texture, GpMatrix *matrix, GpMatrixOrder order) { BOOL invertible; if (!texture) return InvalidParameter; if (!matrix) return Ok; /* the matrix MUST be invertible to be used */ GdipIsMatrixInvertible (matrix, &invertible); if (!invertible) return InvalidParameter; if (order == MatrixOrderPrepend) cairo_matrix_multiply (&texture->matrix, matrix, &texture->matrix); else cairo_matrix_multiply (&texture->matrix, &texture->matrix, matrix); texture->base.changed = TRUE; return Ok; }