From d4a32e5a9867bc2dbd41ffa6e8eb3be44a70c00a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 16 Jun 2010 07:04:07 -0400 Subject: Remove unused libart_lgpl API. According to CallCatcher. --- libart_lgpl/art_svp_ops.c | 155 ---------------------------------------------- 1 file changed, 155 deletions(-) (limited to 'libart_lgpl/art_svp_ops.c') diff --git a/libart_lgpl/art_svp_ops.c b/libart_lgpl/art_svp_ops.c index 5bb837c5ac..08991aac1b 100644 --- a/libart_lgpl/art_svp_ops.c +++ b/libart_lgpl/art_svp_ops.c @@ -183,69 +183,6 @@ art_svp_merge_perturbed (const ArtSVP *svp1, const ArtSVP *svp2) } #endif -/* Compute the union of two vector paths. - - Status of this routine: - - Basic correctness: Seems to work. - - Numerical stability: We cheat (adding random perturbation). Thus, - it seems very likely that no numerical stability problems will be - seen in practice. - - Speed: Would be better if we didn't go to unsorted vector path - and back to add the perturbation. - - Precision: The perturbation fuzzes the coordinates slightly. In - cases of butting segments, razor thin long holes may appear. - -*/ -/** - * art_svp_union: Compute the union of two sorted vector paths. - * @svp1: One sorted vector path. - * @svp2: The other sorted vector path. - * - * Computes the union of the two argument svp's. Given two svp's with - * winding numbers of 0 and 1 everywhere, the resulting winding number - * will be 1 where either (or both) of the argument svp's has a - * winding number 1, 0 otherwise. The result is newly allocated. - * - * Currently, this routine has accuracy problems pending the - * implementation of the new intersector. - * - * Return value: The union of @svp1 and @svp2. - **/ -ArtSVP * -art_svp_union (const ArtSVP *svp1, const ArtSVP *svp2) -{ -#ifdef ART_USE_NEW_INTERSECTOR - ArtSVP *svp3, *svp_new; - ArtSvpWriter *swr; - - svp3 = art_svp_merge (svp1, svp2); - swr = art_svp_writer_rewind_new (ART_WIND_RULE_POSITIVE); - art_svp_intersector (svp3, swr); - svp_new = art_svp_writer_rewind_reap (swr); - art_free (svp3); /* shallow free because svp3 contains shared segments */ - - return svp_new; -#else - ArtSVP *svp3, *svp4, *svp_new; - - svp3 = art_svp_merge_perturbed (svp1, svp2); - svp4 = art_svp_uncross (svp3); - art_svp_free (svp3); - - svp_new = art_svp_rewind_uncrossed (svp4, ART_WIND_RULE_POSITIVE); -#ifdef VERBOSE - print_ps_svp (svp4); - print_ps_svp (svp_new); -#endif - art_svp_free (svp4); - return svp_new; -#endif -} - /* Compute the intersection of two vector paths. Status of this routine: @@ -307,95 +244,3 @@ art_svp_intersect (const ArtSVP *svp1, const ArtSVP *svp2) #endif } -/* Compute the symmetric difference of two vector paths. - - Status of this routine: - - Basic correctness: Seems to work. - - Numerical stability: We cheat (adding random perturbation). Thus, - it seems very likely that no numerical stability problems will be - seen in practice. - - Speed: We could do a lot better by scanning through the svp - representations and culling out any segments that are exactly - identical. It would also be better if we didn't go to unsorted - vector path and back to add the perturbation. - - Precision: Awful. In the case of inputs which are similar (the - common case for canvas display), the entire outline is "hairy." In - addition, the perturbation fuzzes the coordinates slightly. It can - be used as a conservative approximation. - -*/ - -/** - * art_svp_diff: Compute the symmetric difference of two sorted vector paths. - * @svp1: One sorted vector path. - * @svp2: The other sorted vector path. - * - * Computes the symmetric of the two argument svp's. Given two svp's - * with winding numbers of 0 and 1 everywhere, the resulting winding - * number will be 1 where either, but not both, of the argument svp's - * has a winding number 1, 0 otherwise. The result is newly allocated. - * - * Currently, this routine has accuracy problems pending the - * implementation of the new intersector. - * - * Return value: The symmetric difference of @svp1 and @svp2. - **/ -ArtSVP * -art_svp_diff (const ArtSVP *svp1, const ArtSVP *svp2) -{ -#ifdef ART_USE_NEW_INTERSECTOR - ArtSVP *svp3, *svp_new; - ArtSvpWriter *swr; - - svp3 = art_svp_merge (svp1, svp2); - swr = art_svp_writer_rewind_new (ART_WIND_RULE_ODDEVEN); - art_svp_intersector (svp3, swr); - svp_new = art_svp_writer_rewind_reap (swr); - art_free (svp3); /* shallow free because svp3 contains shared segments */ - - return svp_new; -#else - ArtSVP *svp3, *svp4, *svp_new; - - svp3 = art_svp_merge_perturbed (svp1, svp2); - svp4 = art_svp_uncross (svp3); - art_svp_free (svp3); - - svp_new = art_svp_rewind_uncrossed (svp4, ART_WIND_RULE_ODDEVEN); - art_svp_free (svp4); - return svp_new; -#endif -} - -#ifdef ART_USE_NEW_INTERSECTOR -ArtSVP * -art_svp_minus (const ArtSVP *svp1, const ArtSVP *svp2) -{ - ArtSVP *svp2_mod; - ArtSVP *svp3, *svp_new; - ArtSvpWriter *swr; - int i; - - svp2_mod = (ArtSVP *) svp2; /* get rid of the const for a while */ - - /* First invert svp2 to "turn it inside out" */ - for (i = 0; i < svp2_mod->n_segs; i++) - svp2_mod->segs[i].dir = !svp2_mod->segs[i].dir; - - svp3 = art_svp_merge (svp1, svp2_mod); - swr = art_svp_writer_rewind_new (ART_WIND_RULE_POSITIVE); - art_svp_intersector (svp3, swr); - svp_new = art_svp_writer_rewind_reap (swr); - art_free (svp3); /* shallow free because svp3 contains shared segments */ - - /* Flip svp2 back to its original state */ - for (i = 0; i < svp2_mod->n_segs; i++) - svp2_mod->segs[i].dir = !svp2_mod->segs[i].dir; - - return svp_new; -} -#endif /* ART_USE_NEW_INTERSECTOR */ -- cgit v1.2.3