aboutsummaryrefslogtreecommitdiffstats
path: root/libart_lgpl/art_affine.c
diff options
context:
space:
mode:
Diffstat (limited to 'libart_lgpl/art_affine.c')
-rw-r--r--libart_lgpl/art_affine.c109
1 files changed, 0 insertions, 109 deletions
diff --git a/libart_lgpl/art_affine.c b/libart_lgpl/art_affine.c
index 9f332a3520..96007d09c9 100644
--- a/libart_lgpl/art_affine.c
+++ b/libart_lgpl/art_affine.c
@@ -77,29 +77,6 @@ art_affine_invert (double dst[6], const double src[6])
dst[5] = -src[4] * dst[1] - src[5] * dst[3];
}
-/**
- * art_affine_flip: Flip an affine transformation horizontally and/or vertically.
- * @dst_affine: Where the resulting affine is stored.
- * @src_affine: The original affine transformation.
- * @horiz: Whether or not to flip horizontally.
- * @vert: Whether or not to flip horizontally.
- *
- * Flips the affine transform. FALSE for both @horiz and @vert implements
- * a simple copy operation. TRUE for both @horiz and @vert is a
- * 180 degree rotation. It is ok for @src_affine and @dst_affine to
- * be equal pointers.
- **/
-void
-art_affine_flip (double dst_affine[6], const double src_affine[6], int horz, int vert)
-{
- dst_affine[0] = horz ? - src_affine[0] : src_affine[0];
- dst_affine[1] = horz ? - src_affine[1] : src_affine[1];
- dst_affine[2] = vert ? - src_affine[2] : src_affine[2];
- dst_affine[3] = vert ? - src_affine[3] : src_affine[3];
- dst_affine[4] = horz ? - src_affine[4] : src_affine[4];
- dst_affine[5] = vert ? - src_affine[5] : src_affine[5];
-}
-
#define EPSILON 1e-6
/* It's ridiculous I have to write this myself. This is hardcoded to
@@ -335,55 +312,6 @@ art_affine_scale (double dst[6], double sx, double sy)
}
/**
- * art_affine_rotate: Set up a rotation affine transform.
- * @dst: Where to store the resulting affine transform.
- * @theta: Rotation angle in degrees.
- *
- * Sets up a rotation matrix. In the standard libart coordinate
- * system, in which increasing y moves downward, this is a
- * counterclockwise rotation. In the standard PostScript coordinate
- * system, which is reversed in the y direction, it is a clockwise
- * rotation.
- **/
-void
-art_affine_rotate (double dst[6], double theta)
-{
- double s, c;
-
- s = sin (theta * M_PI / 180.0);
- c = cos (theta * M_PI / 180.0);
- dst[0] = c;
- dst[1] = s;
- dst[2] = -s;
- dst[3] = c;
- dst[4] = 0;
- dst[5] = 0;
-}
-
-/**
- * art_affine_shear: Set up a shearing matrix.
- * @dst: Where to store the resulting affine transform.
- * @theta: Shear angle in degrees.
- *
- * Sets up a shearing matrix. In the standard libart coordinate system
- * and a small value for theta, || becomes \\. Horizontal lines remain
- * unchanged.
- **/
-void
-art_affine_shear (double dst[6], double theta)
-{
- double t;
-
- t = tan (theta * M_PI / 180.0);
- dst[0] = 1;
- dst[1] = 0;
- dst[2] = t;
- dst[3] = 1;
- dst[4] = 0;
- dst[5] = 0;
-}
-
-/**
* art_affine_translate: Set up a translation matrix.
* @dst: Where to store the resulting affine transform.
* @tx: X translation amount.
@@ -419,40 +347,3 @@ art_affine_expansion (const double src[6])
return sqrt (fabs (src[0] * src[3] - src[1] * src[2]));
}
-/**
- * art_affine_rectilinear: Determine whether the affine transformation is rectilinear.
- * @src: The original affine transformation.
- *
- * Determines whether @src is rectilinear, i.e. grid-aligned
- * rectangles are transformed to other grid-aligned rectangles. The
- * implementation has epsilon-tolerance for roundoff errors.
- *
- * Return value: TRUE if @src is rectilinear.
- **/
-int
-art_affine_rectilinear (const double src[6])
-{
- return ((fabs (src[1]) < EPSILON && fabs (src[2]) < EPSILON) ||
- (fabs (src[0]) < EPSILON && fabs (src[3]) < EPSILON));
-}
-
-/**
- * art_affine_equal: Determine whether two affine transformations are equal.
- * @matrix1: An affine transformation.
- * @matrix2: Another affine transformation.
- *
- * Determines whether @matrix1 and @matrix2 are equal, with
- * epsilon-tolerance for roundoff errors.
- *
- * Return value: TRUE if @matrix1 and @matrix2 are equal.
- **/
-int
-art_affine_equal (double matrix1[6], double matrix2[6])
-{
- return (fabs (matrix1[0] - matrix2[0]) < EPSILON &&
- fabs (matrix1[1] - matrix2[1]) < EPSILON &&
- fabs (matrix1[2] - matrix2[2]) < EPSILON &&
- fabs (matrix1[3] - matrix2[3]) < EPSILON &&
- fabs (matrix1[4] - matrix2[4]) < EPSILON &&
- fabs (matrix1[5] - matrix2[5]) < EPSILON);
-}