summaryrefslogtreecommitdiff
path: root/src/cairo-matrix.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-05-09 09:12:52 +0000
committerCarl Worth <cworth@cworth.org>2005-05-09 09:12:52 +0000
commit14c690472cf893978331dcf25cc50d43609928ad (patch)
tree1ddcdd4511bd2d3b06308820d1c955932e8253f7 /src/cairo-matrix.c
parent31b4e5b4ecda4b3733f39b5f1f759cc59f953836 (diff)
downloadcairo-14c690472cf893978331dcf25cc50d43609928ad.tar.gz
Push cairo_matrix_t const-correctness down through the entire implmentation, (expanding on preliminary work by Robert O'Callahan <rocallahan@novell.com>)
Diffstat (limited to 'src/cairo-matrix.c')
-rw-r--r--src/cairo-matrix.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c
index 71bd0d2ea..82ec0dbb7 100644
--- a/src/cairo-matrix.c
+++ b/src/cairo-matrix.c
@@ -113,7 +113,7 @@ slim_hidden_def(cairo_matrix_init);
* names (such as a,b,c,d,e,f) for particular manipulations.
**/
void
-_cairo_matrix_get_affine (cairo_matrix_t *matrix,
+_cairo_matrix_get_affine (const cairo_matrix_t *matrix,
double *xx, double *yx,
double *xy, double *yy,
double *x0, double *y0)
@@ -326,7 +326,7 @@ slim_hidden_def(cairo_matrix_multiply);
* (@x1+@dx2,@y1+@dy2) for all values of @x1 and @x2.
**/
void
-cairo_matrix_transform_distance (cairo_matrix_t *matrix, double *dx, double *dy)
+cairo_matrix_transform_distance (const cairo_matrix_t *matrix, double *dx, double *dy)
{
double new_x, new_y;
@@ -347,7 +347,7 @@ slim_hidden_def(cairo_matrix_transform_distance);
* Transforms the point (@x, @y) by @matrix.
**/
void
-cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y)
+cairo_matrix_transform_point (const cairo_matrix_t *matrix, double *x, double *y)
{
cairo_matrix_transform_distance (matrix, x, y);
@@ -357,7 +357,7 @@ cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y)
slim_hidden_def(cairo_matrix_transform_point);
void
-_cairo_matrix_transform_bounding_box (cairo_matrix_t *matrix,
+_cairo_matrix_transform_bounding_box (const cairo_matrix_t *matrix,
double *x, double *y,
double *width, double *height)
{
@@ -474,7 +474,8 @@ cairo_matrix_invert (cairo_matrix_t *matrix)
slim_hidden_def(cairo_matrix_invert);
void
-_cairo_matrix_compute_determinant (cairo_matrix_t *matrix, double *det)
+_cairo_matrix_compute_determinant (const cairo_matrix_t *matrix,
+ double *det)
{
double a, b, c, d;
@@ -485,7 +486,8 @@ _cairo_matrix_compute_determinant (cairo_matrix_t *matrix, double *det)
}
void
-_cairo_matrix_compute_eigen_values (cairo_matrix_t *matrix, double *lambda1, double *lambda2)
+_cairo_matrix_compute_eigen_values (const cairo_matrix_t *matrix,
+ double *lambda1, double *lambda2)
{
/* The eigenvalues of an NxN matrix M are found by solving the polynomial:
@@ -516,7 +518,8 @@ _cairo_matrix_compute_eigen_values (cairo_matrix_t *matrix, double *lambda1, dou
/* Compute the amount that each basis vector is scaled by. */
cairo_status_t
-_cairo_matrix_compute_scale_factors (cairo_matrix_t *matrix, double *sx, double *sy, int x_major)
+_cairo_matrix_compute_scale_factors (const cairo_matrix_t *matrix,
+ double *sx, double *sy, int x_major)
{
double det;
@@ -557,7 +560,7 @@ _cairo_matrix_compute_scale_factors (cairo_matrix_t *matrix, double *sx, double
}
cairo_bool_t
-_cairo_matrix_is_integer_translation(cairo_matrix_t *mat,
+_cairo_matrix_is_integer_translation(const cairo_matrix_t *mat,
int *itx, int *ity)
{
double a, b, c, d, tx, ty;