From 53e86fe162ba90c9457ea63ce1c595e947bd93d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= Date: Wed, 16 Jun 2010 14:32:22 +0200 Subject: Now it looks like libart_lgpl directory is callcatcher clean --- libart_lgpl/art_affine.c | 91 ------------------------------------------------ 1 file changed, 91 deletions(-) (limited to 'libart_lgpl/art_affine.c') 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 -/** - * 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. -- cgit v1.2.3