aboutsummaryrefslogtreecommitdiffstats
path: root/libart_lgpl/art_affine.c
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2010-06-16 20:32:22 +0800
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-06-16 20:32:22 +0800
commit53e86fe162ba90c9457ea63ce1c595e947bd93d3 (patch)
tree6818213faee293e9bf99629be581d2f342cc0c45 /libart_lgpl/art_affine.c
parentd4a32e5a9867bc2dbd41ffa6e8eb3be44a70c00a (diff)
downloadgsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.tar
gsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.tar.gz
gsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.tar.bz2
gsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.tar.lz
gsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.tar.xz
gsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.tar.zst
gsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.zip
Now it looks like libart_lgpl directory is callcatcher clean
Diffstat (limited to 'libart_lgpl/art_affine.c')
-rw-r--r--libart_lgpl/art_affine.c91
1 files changed, 0 insertions, 91 deletions
diff --git a/libart_lgpl/art_affine.c b/libart_lgpl/art_affine.c
index 96007d09c9..8f3973de8e 100644
--- a/libart_lgpl/art_affine.c
+++ b/libart_lgpl/art_affine.c
@@ -151,97 +151,6 @@ art_ftoa (char str[80], double x)
}
-
-#include <stdlib.h>
-/**
- * art_affine_to_string: Convert affine transformation to concise PostScript string representation.
- * @str: Where to store the resulting string.
- * @src: The affine transform.
- *
- * Converts an affine transform into a bit of PostScript code that
- * implements the transform. Special cases of scaling, rotation, and
- * translation are detected, and the corresponding PostScript
- * operators used (this greatly aids understanding the output
- * generated). The identity transform is mapped to the null string.
- **/
-void
-art_affine_to_string (char str[128], const double src[6])
-{
- char tmp[80];
- int i, ix;
-
-#if 0
- for (i = 0; i < 1000; i++)
- {
- double d = rand () * .1 / RAND_MAX;
- art_ftoa (tmp, d);
- printf ("%g %f %s\n", d, d, tmp);
- }
-#endif
- if (fabs (src[4]) < EPSILON && fabs (src[5]) < EPSILON)
- {
- /* could be scale or rotate */
- if (fabs (src[1]) < EPSILON && fabs (src[2]) < EPSILON)
- {
- /* scale */
- if (fabs (src[0] - 1) < EPSILON && fabs (src[3] - 1) < EPSILON)
- {
- /* identity transform */
- str[0] = '\0';
- return;
- }
- else
- {
- ix = 0;
- ix += art_ftoa (str + ix, src[0]);
- str[ix++] = ' ';
- ix += art_ftoa (str + ix, src[3]);
- strcpy (str + ix, " scale");
- return;
- }
- }
- else
- {
- /* could be rotate */
- if (fabs (src[0] - src[3]) < EPSILON &&
- fabs (src[1] + src[2]) < EPSILON &&
- fabs (src[0] * src[0] + src[1] * src[1] - 1) < 2 * EPSILON)
- {
- double theta;
-
- theta = (180 / M_PI) * atan2 (src[1], src[0]);
- art_ftoa (tmp, theta);
- sprintf (str, "%s rotate", tmp);
- return;
- }
- }
- }
- else
- {
- /* could be translate */
- if (fabs (src[0] - 1) < EPSILON && fabs (src[1]) < EPSILON &&
- fabs (src[2]) < EPSILON && fabs (src[3] - 1) < EPSILON)
- {
- ix = 0;
- ix += art_ftoa (str + ix, src[4]);
- str[ix++] = ' ';
- ix += art_ftoa (str + ix, src[5]);
- strcpy (str + ix, " translate");
- return;
- }
- }
-
- ix = 0;
- str[ix++] = '[';
- str[ix++] = ' ';
- for (i = 0; i < 6; i++)
- {
- ix += art_ftoa (str + ix, src[i]);
- str[ix++] = ' ';
- }
- strcpy (str + ix, "] concat");
-}
-
/**
* art_affine_multiply: Multiply two affine transformation matrices.
* @dst: Where to store the result.