diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2010-06-16 20:32:22 +0800 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2010-06-16 20:32:22 +0800 |
commit | 53e86fe162ba90c9457ea63ce1c595e947bd93d3 (patch) | |
tree | 6818213faee293e9bf99629be581d2f342cc0c45 /libart_lgpl | |
parent | d4a32e5a9867bc2dbd41ffa6e8eb3be44a70c00a (diff) | |
download | gsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.tar.gz gsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.tar.zst gsoc2013-evolution-53e86fe162ba90c9457ea63ce1c595e947bd93d3.zip |
Now it looks like libart_lgpl directory is callcatcher clean
Diffstat (limited to 'libart_lgpl')
-rw-r--r-- | libart_lgpl/Makefile.am | 2 | ||||
-rw-r--r-- | libart_lgpl/art_affine.c | 91 | ||||
-rw-r--r-- | libart_lgpl/art_affine.h | 3 | ||||
-rw-r--r-- | libart_lgpl/art_misc.c | 16 | ||||
-rw-r--r-- | libart_lgpl/art_misc.h | 3 | ||||
-rw-r--r-- | libart_lgpl/art_pixbuf.c | 113 | ||||
-rw-r--r-- | libart_lgpl/art_pixbuf.h | 75 | ||||
-rw-r--r-- | libart_lgpl/art_rect.c | 22 | ||||
-rw-r--r-- | libart_lgpl/art_render.c | 93 | ||||
-rw-r--r-- | libart_lgpl/art_render.h | 11 | ||||
-rw-r--r-- | libart_lgpl/art_svp.c | 77 | ||||
-rw-r--r-- | libart_lgpl/art_svp.h | 6 | ||||
-rw-r--r-- | libart_lgpl/art_svp_intersect.c | 93 | ||||
-rw-r--r-- | libart_lgpl/art_vpath.c | 3 | ||||
-rw-r--r-- | libart_lgpl/libart.h | 1 |
15 files changed, 0 insertions, 609 deletions
diff --git a/libart_lgpl/Makefile.am b/libart_lgpl/Makefile.am index 8f71243893..1291a7bfd4 100644 --- a/libart_lgpl/Makefile.am +++ b/libart_lgpl/Makefile.am @@ -15,7 +15,6 @@ libart_lgplinclude_HEADERS = \ art_gray_svp.h \ art_misc.h \ art_pathcode.h \ - art_pixbuf.h \ art_point.h \ art_rect.h \ art_rect_svp.h \ @@ -49,7 +48,6 @@ libart_lgpl_la_SOURCES = \ art_bpath.c \ art_gray_svp.c \ art_misc.c \ - art_pixbuf.c \ art_rect.c \ art_rect_svp.c \ art_rect_uta.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 <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. diff --git a/libart_lgpl/art_affine.h b/libart_lgpl/art_affine.h index 83f64b94ec..44326d1388 100644 --- a/libart_lgpl/art_affine.h +++ b/libart_lgpl/art_affine.h @@ -34,9 +34,6 @@ void art_affine_invert (double dst_affine[6], const double src_affine[6]); void -art_affine_to_string (char str[128], const double src[6]); - -void art_affine_multiply (double dst[6], const double src1[6], const double src2[6]); diff --git a/libart_lgpl/art_misc.c b/libart_lgpl/art_misc.c index ca3fc5015d..777ad702a6 100644 --- a/libart_lgpl/art_misc.c +++ b/libart_lgpl/art_misc.c @@ -61,22 +61,6 @@ art_warn (const char *fmt, ...) va_end (ap); } -/** - * art_dprint: Print the debug message to stderr. - * @fmt: The printf-style format for the debug message. - * - * Used for generating debug output. - **/ -void -art_dprint (const char *fmt, ...) -{ - va_list ap; - - va_start (ap, fmt); - vfprintf (stderr, fmt, ap); - va_end (ap); -} - void *art_alloc(size_t size) { return malloc(size); diff --git a/libart_lgpl/art_misc.h b/libart_lgpl/art_misc.h index 5bdf74a1b1..b0a445b238 100644 --- a/libart_lgpl/art_misc.h +++ b/libart_lgpl/art_misc.h @@ -86,9 +86,6 @@ art_die (const char *fmt, ...) ART_GNUC_PRINTF (1, 2); void art_warn (const char *fmt, ...) ART_GNUC_PRINTF (1, 2); -void -art_dprint (const char *fmt, ...) ART_GNUC_PRINTF (1, 2); - #ifdef __cplusplus } #endif diff --git a/libart_lgpl/art_pixbuf.c b/libart_lgpl/art_pixbuf.c deleted file mode 100644 index c624c7dd7d..0000000000 --- a/libart_lgpl/art_pixbuf.c +++ /dev/null @@ -1,113 +0,0 @@ -/* Libart_LGPL - library of basic graphic primitives - * Copyright (C) 1998 Raph Levien - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" -#include "art_pixbuf.h" - -#include "art_misc.h" -#include <string.h> - -/** - * art_pixbuf_new_rgb_dnotify: Create a new RGB #ArtPixBuf with explicit destroy notification. - * @pixels: A buffer containing the actual pixel data. - * @width: The width of the pixbuf. - * @height: The height of the pixbuf. - * @rowstride: The rowstride of the pixbuf. - * @dfunc_data: The private data passed to @dfunc. - * @dfunc: The destroy notification function. - * - * Creates a generic data structure for holding a buffer of RGB - * pixels. It is possible to think of an #ArtPixBuf as a - * virtualization over specific pixel buffer formats. - * - * @dfunc is called with @dfunc_data and @pixels as arguments when the - * #ArtPixBuf is destroyed. Using a destroy notification function - * allows a wide range of memory management disciplines for the pixel - * memory. A NULL value for @dfunc is also allowed and means that no - * special action will be taken on destruction. - * - * Return value: The newly created #ArtPixBuf. - **/ -ArtPixBuf * -art_pixbuf_new_rgb_dnotify (art_u8 *pixels, int width, int height, int rowstride, - void *dfunc_data, ArtDestroyNotify dfunc) -{ - ArtPixBuf *pixbuf; - - pixbuf = art_new (ArtPixBuf, 1); - - pixbuf->format = ART_PIX_RGB; - pixbuf->n_channels = 3; - pixbuf->has_alpha = 0; - pixbuf->bits_per_sample = 8; - - pixbuf->pixels = (art_u8 *) pixels; - pixbuf->width = width; - pixbuf->height = height; - pixbuf->rowstride = rowstride; - pixbuf->destroy_data = dfunc_data; - pixbuf->destroy = dfunc; - - return pixbuf; -} - -/** - * art_pixbuf_new_rgba_dnotify: Create a new RGBA #ArtPixBuf with explicit destroy notification. - * @pixels: A buffer containing the actual pixel data. - * @width: The width of the pixbuf. - * @height: The height of the pixbuf. - * @rowstride: The rowstride of the pixbuf. - * @dfunc_data: The private data passed to @dfunc. - * @dfunc: The destroy notification function. - * - * Creates a generic data structure for holding a buffer of RGBA - * pixels. It is possible to think of an #ArtPixBuf as a - * virtualization over specific pixel buffer formats. - * - * @dfunc is called with @dfunc_data and @pixels as arguments when the - * #ArtPixBuf is destroyed. Using a destroy notification function - * allows a wide range of memory management disciplines for the pixel - * memory. A NULL value for @dfunc is also allowed and means that no - * special action will be taken on destruction. - * - * Return value: The newly created #ArtPixBuf. - **/ -ArtPixBuf * -art_pixbuf_new_rgba_dnotify (art_u8 *pixels, int width, int height, int rowstride, - void *dfunc_data, ArtDestroyNotify dfunc) -{ - ArtPixBuf *pixbuf; - - pixbuf = art_new (ArtPixBuf, 1); - - pixbuf->format = ART_PIX_RGB; - pixbuf->n_channels = 4; - pixbuf->has_alpha = 1; - pixbuf->bits_per_sample = 8; - - pixbuf->pixels = (art_u8 *) pixels; - pixbuf->width = width; - pixbuf->height = height; - pixbuf->rowstride = rowstride; - pixbuf->destroy_data = dfunc_data; - pixbuf->destroy = dfunc; - - return pixbuf; -} - diff --git a/libart_lgpl/art_pixbuf.h b/libart_lgpl/art_pixbuf.h deleted file mode 100644 index 6d79f5d653..0000000000 --- a/libart_lgpl/art_pixbuf.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Libart_LGPL - library of basic graphic primitives - * Copyright (C) 1998 Raph Levien - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __ART_PIXBUF_H__ -#define __ART_PIXBUF_H__ - -/* A generic data structure for holding a buffer of pixels. One way - to think about this module is as a virtualization over specific - pixel buffer formats. */ - -#include <libart_lgpl/art_misc.h> - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef void (*ArtDestroyNotify) (void *func_data, void *data); - -typedef struct _ArtPixBuf ArtPixBuf; - -typedef enum { - ART_PIX_RGB - /* gray, cmyk, lab, ... ? */ -} ArtPixFormat; - - -/* The pixel buffer consists of width * height pixels, each of which - has n_channels samples. It is stored in simple packed format. */ - -struct _ArtPixBuf { - /*< public >*/ - ArtPixFormat format; - int n_channels; - int has_alpha; - int bits_per_sample; - - art_u8 *pixels; - int width; - int height; - int rowstride; - void *destroy_data; - ArtDestroyNotify destroy; -}; - -/* allocate an ArtPixBuf and notify creator upon destruction */ -ArtPixBuf * -art_pixbuf_new_rgb_dnotify (art_u8 *pixels, int width, int height, int rowstride, - void *dfunc_data, ArtDestroyNotify dfunc); - -ArtPixBuf * -art_pixbuf_new_rgba_dnotify (art_u8 *pixels, int width, int height, int rowstride, - void *dfunc_data, ArtDestroyNotify dfunc); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libart_lgpl/art_rect.c b/libart_lgpl/art_rect.c index 6d318a80eb..bd1cd6e229 100644 --- a/libart_lgpl/art_rect.c +++ b/libart_lgpl/art_rect.c @@ -33,21 +33,6 @@ /* rectangle primitives stolen from gzilla */ /** - * art_irect_copy: Make a copy of an integer rectangle. - * @dest: Where the copy is stored. - * @src: The source rectangle. - * - * Copies the rectangle. - **/ -void -art_irect_copy (ArtIRect *dest, const ArtIRect *src) { - dest->x0 = src->x0; - dest->y0 = src->y0; - dest->x1 = src->x1; - dest->y1 = src->y1; -} - -/** * art_irect_intersection: Find intersection of two integer rectangles. * @dest: Where the result is stored. * @src1: A source rectangle. @@ -74,13 +59,6 @@ art_irect_empty (const ArtIRect *src) { return (src->x1 <= src->x0 || src->y1 <= src->y0); } -#if 0 -gboolean irect_point_inside (ArtIRect *rect, GzwPoint *point) { - return (point->x >= rect->x0 && point->y >= rect->y0 && - point->x < rect->x1 && point->y < rect->y1); -} -#endif - /** * art_drect_copy: Make a copy of a rectangle. * @dest: Where the copy is stored. diff --git a/libart_lgpl/art_render.c b/libart_lgpl/art_render.c index 771f15fe44..8792908158 100644 --- a/libart_lgpl/art_render.c +++ b/libart_lgpl/art_render.c @@ -39,10 +39,6 @@ struct _ArtRenderPriv { ArtRenderCallback **callbacks; }; -/* todo on clear routines: I haven't really figured out what to do - with clearing the alpha channel. It _should_ be possible to clear - to an arbitrary RGBA color. */ - static void art_render_nop_done (ArtRenderCallback *self, ArtRender *render) { @@ -740,92 +736,3 @@ const ArtRenderCallback art_render_composite_8_opt2_obj = }; -/** - * art_render_invoke_callbacks: Invoke the callbacks in the render object. - * @render: The render object. - * @y: The current Y coordinate value. - * - * Invokes the callbacks of the render object in the appropriate - * order. Drivers should call this routine once per scanline. - * - * todo: should management of dest devolve to this routine? very - * plausibly yes. - **/ -void -art_render_invoke_callbacks (ArtRender *render, art_u8 *dest, int y) -{ - ArtRenderPriv *priv = (ArtRenderPriv *)render; - int i; - - for (i = 0; i < priv->n_callbacks; i++) - { - ArtRenderCallback *callback; - - callback = priv->callbacks[i]; - callback->render (callback, render, dest, y); - } -} - -/** - * art_render_add_mask_source: Add a mask source to the render object. - * @render: Render object. - * @mask_source: Mask source to add. - * - * This routine adds a mask source to the render object. In general, - * client api's for adding mask sources should just take a render object, - * then the mask source creation function should call this function. - * Clients should never have to call this function directly, unless of - * course they're creating custom mask sources. - **/ -void -art_render_add_mask_source (ArtRender *render, ArtMaskSource *mask_source) -{ - ArtRenderPriv *priv = (ArtRenderPriv *)render; - int n_mask_source = priv->n_mask_source++; - - if (n_mask_source == 0) - priv->mask_source = art_new (ArtMaskSource *, 1); - /* This predicate is true iff n_mask_source is a power of two */ - else if (!(n_mask_source & (n_mask_source - 1))) - priv->mask_source = art_renew (priv->mask_source, ArtMaskSource *, - n_mask_source << 1); - - priv->mask_source[n_mask_source] = mask_source; -} - -/** - * art_render_add_image_source: Add a mask source to the render object. - * @render: Render object. - * @image_source: Image source to add. - * - * This routine adds an image source to the render object. In general, - * client api's for adding image sources should just take a render - * object, then the mask source creation function should call this - * function. Clients should never have to call this function - * directly, unless of course they're creating custom image sources. - **/ -void -art_render_add_image_source (ArtRender *render, ArtImageSource *image_source) -{ - ArtRenderPriv *priv = (ArtRenderPriv *)render; - - if (priv->image_source != NULL) - { - art_warn ("art_render_add_image_source: image source already present.\n"); - return; - } - priv->image_source = image_source; -} - -/* Solid image source object and methods. Perhaps this should go into a - separate file. */ - -typedef struct _ArtImageSourceSolid ArtImageSourceSolid; - -struct _ArtImageSourceSolid { - ArtImageSource super; - ArtPixMaxDepth color[ART_MAX_CHAN]; - art_u32 *rgbtab; - art_boolean init; -}; - diff --git a/libart_lgpl/art_render.h b/libart_lgpl/art_render.h index db0933ea83..69e1d9346e 100644 --- a/libart_lgpl/art_render.h +++ b/libart_lgpl/art_render.h @@ -139,17 +139,6 @@ struct _ArtRender { art_boolean need_span; }; -/* The next two functions are for custom mask sources only. */ -void -art_render_add_mask_source (ArtRender *render, ArtMaskSource *mask_source); - -void -art_render_invoke_callbacks (ArtRender *render, art_u8 *dest, int y); - -/* The following function is for custom image sources only. */ -void -art_render_add_image_source (ArtRender *render, ArtImageSource *image_source); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/libart_lgpl/art_svp.c b/libart_lgpl/art_svp.c index 8d7f7d143f..09def996b6 100644 --- a/libart_lgpl/art_svp.c +++ b/libart_lgpl/art_svp.c @@ -24,83 +24,6 @@ #include "art_misc.h" -/* Add a new segment. The arguments can be zero and NULL if the caller - would rather fill them in later. - - We also realloc one auxiliary array of ints of size n_segs if - desired. -*/ -/** - * art_svp_add_segment: Add a segment to an #ArtSVP structure. - * @p_vp: Pointer to where the #ArtSVP structure is stored. - * @pn_segs_max: Pointer to the allocated size of *@p_vp. - * @pn_points_max: Pointer to where auxiliary array is stored. - * @n_points: Number of points for new segment. - * @dir: Direction for new segment; 0 is up, 1 is down. - * @points: Points for new segment. - * @bbox: Bounding box for new segment. - * - * Adds a new segment to an ArtSVP structure. This routine reallocates - * the structure if necessary, updating *@p_vp and *@pn_segs_max as - * necessary. - * - * The new segment is simply added after all other segments. Thus, - * this routine should be called in order consistent with the #ArtSVP - * sorting rules. - * - * If the @bbox argument is given, it is simply stored in the new - * segment. Otherwise (if it is NULL), the bounding box is computed - * from the @points given. - **/ -int -art_svp_add_segment (ArtSVP **p_vp, int *pn_segs_max, - int **pn_points_max, - int n_points, int dir, ArtPoint *points, - ArtDRect *bbox) -{ - int seg_num; - ArtSVP *svp; - ArtSVPSeg *seg; - - svp = *p_vp; - seg_num = svp->n_segs++; - if (*pn_segs_max == seg_num) - { - *pn_segs_max <<= 1; - svp = (ArtSVP *)art_realloc (svp, sizeof(ArtSVP) + - (*pn_segs_max - 1) * sizeof(ArtSVPSeg)); - *p_vp = svp; - if (pn_points_max != NULL) - *pn_points_max = art_renew (*pn_points_max, int, *pn_segs_max); - } - seg = &svp->segs[seg_num]; - seg->n_points = n_points; - seg->dir = dir; - seg->points = points; - if (bbox) - seg->bbox = *bbox; - else if (points) - { - double x_min, x_max; - int i; - - x_min = x_max = points[0].x; - for (i = 1; i < n_points; i++) - { - if (x_min > points[i].x) - x_min = points[i].x; - if (x_max < points[i].x) - x_max = points[i].x; - } - seg->bbox.x0 = x_min; - seg->bbox.y0 = points[0].y; - - seg->bbox.x1 = x_max; - seg->bbox.y1 = points[n_points - 1].y; - } - return seg_num; -} - /** * art_svp_free: Free an #ArtSVP structure. diff --git a/libart_lgpl/art_svp.h b/libart_lgpl/art_svp.h index c898c7a2ec..fde6c22e64 100644 --- a/libart_lgpl/art_svp.h +++ b/libart_lgpl/art_svp.h @@ -44,12 +44,6 @@ struct _ArtSVP { ArtSVPSeg segs[1]; }; -int -art_svp_add_segment (ArtSVP **p_vp, int *pn_segs_max, - int **pn_points_max, - int n_points, int dir, ArtPoint *points, - ArtDRect *bbox); - void art_svp_free (ArtSVP *svp); diff --git a/libart_lgpl/art_svp_intersect.c b/libart_lgpl/art_svp_intersect.c index 4ece5f4643..470c16e7ff 100644 --- a/libart_lgpl/art_svp_intersect.c +++ b/libart_lgpl/art_svp_intersect.c @@ -347,10 +347,6 @@ art_svp_writer_rewind_add_segment (ArtSvpWriter *self, int wind_left, if (left_filled == right_filled) { /* discard segment now */ -#ifdef VERBOSE - art_dprint ("swr add_segment: %d += %d (%g, %g) --> -1\n", - wind_left, delta_wind, x, y); -#endif return -1; } @@ -377,11 +373,6 @@ art_svp_writer_rewind_add_segment (ArtSvpWriter *self, int wind_left, seg->points = art_new (ArtPoint, init_n_points_max); seg->points[0].x = x; seg->points[0].y = y; -#ifdef VERBOSE - art_dprint ("swr add_segment: %d += %d (%g, %g) --> %d(%s)\n", - wind_left, delta_wind, x, y, seg_num, - seg->dir ? "v" : "^"); -#endif return seg_num; } @@ -393,9 +384,6 @@ art_svp_writer_rewind_add_point (ArtSvpWriter *self, int seg_id, ArtSVPSeg *seg; int n_points; -#ifdef VERBOSE - art_dprint ("swr add_point: %d (%g, %g)\n", seg_id, x, y); -#endif if (seg_id < 0) /* omitted segment */ return; @@ -431,9 +419,6 @@ art_svp_writer_rewind_close_segment (ArtSvpWriter *self, int seg_id) } #endif -#ifdef VERBOSE - art_dprint ("swr close_segment: %d\n", seg_id); -#endif } ArtSVP * @@ -607,9 +592,6 @@ art_svp_intersect_add_horiz (ArtIntersectCtx *ctx, ArtActiveSeg *seg) seg->flags |= ART_ACTIVE_FLAGS_IN_HORIZ; #endif -#ifdef VERBOSE - art_dprint ("add_horiz %lx, x = %g\n", (unsigned long) seg, seg->horiz_x); -#endif for (place = *pp; place != NULL && (place->horiz_x > seg->horiz_x || (place->horiz_x == seg->horiz_x && place->b < seg->b)); @@ -680,11 +662,6 @@ art_svp_intersect_break (ArtIntersectCtx *ctx, ArtActiveSeg *seg, if ((break_flags == ART_BREAK_LEFT && x > x_ref) || (break_flags == ART_BREAK_RIGHT && x < x_ref)) { -#ifdef VERBOSE - art_dprint ("art_svp_intersect_break: limiting x to %f, was %f, %s\n", - x_ref, x, break_flags == ART_BREAK_LEFT ? "left" : "right"); - x = x_ref; -#endif } /* I think we can count on min(x0, x1) <= x <= max(x0, x1) with sane @@ -867,12 +844,6 @@ art_svp_intersect_test_cross (ArtIntersectCtx *ctx, double d0, d1, t; double x, y; /* intersection point */ -#ifdef VERBOSE - static int count = 0; - - art_dprint ("art_svp_intersect_test_cross %lx <-> %lx: count=%d\n", - (unsigned long)left_seg, (unsigned long)right_seg, count++); -#endif if (left_seg->y0 == right_seg->y0 && left_seg->x[0] == right_seg->x[0]) { @@ -1042,10 +1013,6 @@ art_svp_intersect_test_cross (ArtIntersectCtx *ctx, { if (y != right_seg->y0) { -#ifdef VERBOSE - art_dprint ("art_svp_intersect_test_cross: intersection (%g, %g) matches former y0 of %lx, %lx\n", - x, y, (unsigned long)left_seg, (unsigned long)right_seg); -#endif art_svp_intersect_push_pt (ctx, right_seg, x, y); if ((break_flags & ART_BREAK_RIGHT) && right_seg->right != NULL) art_svp_intersect_add_point (ctx, x, y, right_seg->right, @@ -1081,10 +1048,6 @@ art_svp_intersect_test_cross (ArtIntersectCtx *ctx, } else if (y == right_seg->y0) { -#ifdef VERBOSE - art_dprint ("*** art_svp_intersect_test_cross: intersection (%g, %g) matches latter y0 of %lx, %lx\n", - x, y, (unsigned long)left_seg, (unsigned long)right_seg); -#endif art_svp_intersect_push_pt (ctx, left_seg, x, y); if ((break_flags & ART_BREAK_LEFT) && left_seg->left != NULL) art_svp_intersect_add_point (ctx, x, y, left_seg->left, @@ -1092,10 +1055,6 @@ art_svp_intersect_test_cross (ArtIntersectCtx *ctx, } else { -#ifdef VERBOSE - art_dprint ("Inserting (%g, %g) into %lx, %lx\n", - x, y, (unsigned long)left_seg, (unsigned long)right_seg); -#endif /* Insert the intersection point into both segments. */ art_svp_intersect_push_pt (ctx, left_seg, x, y); art_svp_intersect_push_pt (ctx, right_seg, x, y); @@ -1137,9 +1096,6 @@ static /* todo inline */ void art_svp_intersect_active_free (ArtActiveSeg *seg) { art_free (seg->stack); -#ifdef VERBOSE - art_dprint ("Freeing %lx\n", (unsigned long) seg); -#endif art_free (seg); } @@ -1264,10 +1220,6 @@ art_svp_intersect_horiz (ArtIntersectCtx *ctx, ArtActiveSeg *seg, { art_svp_intersect_break (ctx, left, x1, ctx->y, ART_BREAK_LEFT); } -#ifdef VERBOSE - art_dprint ("x0=%g > x1=%g, swapping %lx, %lx\n", - x0, x1, (unsigned long)left, (unsigned long)seg); -#endif art_svp_intersect_swap_active (ctx, left, seg); if (first && left->right != NULL) { @@ -1296,10 +1248,6 @@ art_svp_intersect_horiz (ArtIntersectCtx *ctx, ArtActiveSeg *seg, art_svp_intersect_break (ctx, right, x1, ctx->y, ART_BREAK_LEFT); } -#ifdef VERBOSE - art_dprint ("[right]x0=%g < x1=%g, swapping %lx, %lx\n", - x0, x1, (unsigned long)seg, (unsigned long)right); -#endif art_svp_intersect_swap_active (ctx, seg, right); if (first && right->left != NULL) { @@ -1330,10 +1278,6 @@ art_svp_intersect_insert_line (ArtIntersectCtx *ctx, ArtActiveSeg *seg) { if (seg->y1 == seg->y0) { -#ifdef VERBOSE - art_dprint ("art_svp_intersect_insert_line: %lx is horizontal\n", - (unsigned long)seg); -#endif art_svp_intersect_horiz (ctx, seg, seg->x[0], seg->x[1]); } else @@ -1517,13 +1461,6 @@ art_svp_intersect_horiz_commit (ArtIntersectCtx *ctx) int horiz_wind = 0; double last_x = 0; /* initialization just to avoid warning */ -#ifdef VERBOSE - art_dprint ("art_svp_intersect_horiz_commit: y=%g\n", ctx->y); - for (seg = ctx->horiz_first; seg != NULL; seg = seg->horiz_right) - art_dprint (" %lx: %g %+d\n", - (unsigned long)seg, seg->horiz_x, seg->horiz_delta_wind); -#endif - /* Output points to svp writer. */ for (seg = ctx->horiz_first; seg != NULL;) { @@ -1566,10 +1503,6 @@ art_svp_intersect_horiz_commit (ArtIntersectCtx *ctx) do { -#ifdef VERBOSE - art_dprint (" curs %lx: winding_number = %d += %d\n", - (unsigned long)curs, winding_number, curs->delta_wind); -#endif if (!(curs->flags & ART_ACTIVE_FLAGS_OUT) || curs->wind_left != winding_number) { @@ -1624,23 +1557,6 @@ art_svp_intersect_horiz_commit (ArtIntersectCtx *ctx) #endif } -#ifdef VERBOSE -static void -art_svp_intersect_print_active (ArtIntersectCtx *ctx) -{ - ArtActiveSeg *seg; - - art_dprint ("Active list (y = %g):\n", ctx->y); - for (seg = ctx->active_head; seg != NULL; seg = seg->right) - { - art_dprint (" %lx: (%g, %g)-(%g, %g), (a, b, c) = (%g, %g, %g)\n", - (unsigned long)seg, - seg->x[0], seg->y0, seg->x[1], seg->y1, - seg->a, seg->b, seg->c); - } -} -#endif - #ifdef SANITYCHECK static void art_svp_intersect_sanitycheck (ArtIntersectCtx *ctx) @@ -1715,9 +1631,6 @@ art_svp_intersector (const ArtSVP *in, ArtSvpWriter *out) ArtIntersectCtx *ctx; ArtPriQ *pq; ArtPriPoint *first_point; -#ifdef VERBOSE - int count = 0; -#endif if (in->n_segs == 0) return; @@ -1746,12 +1659,6 @@ art_svp_intersector (const ArtSVP *in, ArtSvpWriter *out) ArtPriPoint *pri_point = art_pri_choose (pq); ArtActiveSeg *seg = (ArtActiveSeg *)pri_point->user_data; -#ifdef VERBOSE - art_dprint ("\nIntersector step %d\n", count++); - art_svp_intersect_print_active (ctx); - art_dprint ("priq choose (%g, %g) %lx\n", pri_point->x, pri_point->y, - (unsigned long)pri_point->user_data); -#endif #ifdef SANITYCHECK art_svp_intersect_sanitycheck(ctx); #endif diff --git a/libart_lgpl/art_vpath.c b/libart_lgpl/art_vpath.c index 5152188b1b..bfdb9acca5 100644 --- a/libart_lgpl/art_vpath.c +++ b/libart_lgpl/art_vpath.c @@ -59,9 +59,6 @@ art_vpath_add_point (ArtVpath **p_vpath, int *pn_points, int *pn_points_max, (*p_vpath)[i].y = y; } -/* number of steps should really depend on radius. */ -#define CIRCLE_STEPS 128 - /** * art_vpath_bbox_drect: Determine bounding box of vpath. * @vec: Source vpath. diff --git a/libart_lgpl/libart.h b/libart_lgpl/libart.h index 6d93588bf5..7ab8fb384c 100644 --- a/libart_lgpl/libart.h +++ b/libart_lgpl/libart.h @@ -8,7 +8,6 @@ #include <libart_lgpl/art_gray_svp.h> #include <libart_lgpl/art_misc.h> #include <libart_lgpl/art_pathcode.h> -#include <libart_lgpl/art_pixbuf.h> #include <libart_lgpl/art_point.h> #include <libart_lgpl/art_rect.h> #include <libart_lgpl/art_rect_svp.h> |