diff options
Diffstat (limited to 'fitzdraw')
-rw-r--r-- | fitzdraw/glyphcache.c | 6 | ||||
-rw-r--r-- | fitzdraw/imagescale.c | 8 | ||||
-rw-r--r-- | fitzdraw/meshdraw.c | 4 | ||||
-rw-r--r-- | fitzdraw/pathfill.c | 10 | ||||
-rw-r--r-- | fitzdraw/pathscan.c | 12 | ||||
-rw-r--r-- | fitzdraw/pathstroke.c | 60 | ||||
-rw-r--r-- | fitzdraw/pixmap.c | 8 | ||||
-rw-r--r-- | fitzdraw/render.c | 48 |
8 files changed, 78 insertions, 78 deletions
diff --git a/fitzdraw/glyphcache.c b/fitzdraw/glyphcache.c index 38beb677..cc39f437 100644 --- a/fitzdraw/glyphcache.c +++ b/fitzdraw/glyphcache.c @@ -57,7 +57,7 @@ static unsigned int hashkey(fz_key *key) return hash; } -fz_error * +fz_error fz_newglyphcache(fz_glyphcache **arenap, int slots, int size) { fz_glyphcache *arena; @@ -313,10 +313,10 @@ evictall(fz_glyphcache *arena) arena->used = 0; } -fz_error * +fz_error fz_renderglyph(fz_glyphcache *arena, fz_glyph *glyph, fz_font *font, int cid, fz_matrix ctm) { - fz_error *error; + fz_error error; fz_key key; fz_val *val; int size; diff --git a/fitzdraw/imagescale.c b/fitzdraw/imagescale.c index d8f28917..065a250e 100644 --- a/fitzdraw/imagescale.c +++ b/fitzdraw/imagescale.c @@ -179,7 +179,7 @@ void (*fz_scol2)(byte *src, byte *dst, int w, int denom) = scol2; void (*fz_scol4)(byte *src, byte *dst, int w, int denom) = scol4; void (*fz_scol5)(byte *src, byte *dst, int w, int denom) = scol5; -fz_error * +fz_error fz_newscaledpixmap(fz_pixmap **dstp, int w, int h, int n, int xdenom, int ydenom) { int ow = (w + xdenom - 1) / xdenom; @@ -188,7 +188,7 @@ fz_newscaledpixmap(fz_pixmap **dstp, int w, int h, int n, int xdenom, int ydenom } /* TODO: refactor */ -fz_error * +fz_error fz_scalepixmaptile(fz_pixmap *dst, int xoffs, int yoffs, fz_pixmap *src, int xdenom, int ydenom) { unsigned char *buf; @@ -271,10 +271,10 @@ fz_scalepixmaptile(fz_pixmap *dst, int xoffs, int yoffs, fz_pixmap *src, int xde return fz_okay; } -fz_error * +fz_error fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom) { - fz_error *error; + fz_error error; fz_pixmap *dst; unsigned char *buf; int y, iy, oy; diff --git a/fitzdraw/meshdraw.c b/fitzdraw/meshdraw.c index cede57d3..2eedcbc2 100644 --- a/fitzdraw/meshdraw.c +++ b/fitzdraw/meshdraw.c @@ -312,12 +312,12 @@ fz_drawtriangle(fz_pixmap *pix, float *av, float *bv, float *cv, int n) * mesh drawing */ -fz_error * +fz_error fz_rendershade(fz_shade *shade, fz_matrix ctm, fz_colorspace *destcs, fz_pixmap *dest) { unsigned char clut[256][3]; unsigned char *s, *d; - fz_error *error; + fz_error error; fz_pixmap *temp; float rgb[3]; float tri[3][MAXN]; diff --git a/fitzdraw/pathfill.c b/fitzdraw/pathfill.c index cf76f216..92aff3b4 100644 --- a/fitzdraw/pathfill.c +++ b/fitzdraw/pathfill.c @@ -2,7 +2,7 @@ #include "fitz_tree.h" #include "fitz_draw.h" -static fz_error * +static fz_error line(fz_gel *gel, fz_matrix *ctm, float x0, float y0, float x1, float y1) { float tx0 = ctm->a * x0 + ctm->c * y0 + ctm->e; @@ -12,14 +12,14 @@ line(fz_gel *gel, fz_matrix *ctm, float x0, float y0, float x1, float y1) return fz_insertgel(gel, tx0, ty0, tx1, ty1); } -static fz_error * +static fz_error bezier(fz_gel *gel, fz_matrix *ctm, float flatness, float xa, float ya, float xb, float yb, float xc, float yc, float xd, float yd) { - fz_error *error; + fz_error error; float dmax; float xab, yab; float xbc, ybc; @@ -66,10 +66,10 @@ bezier(fz_gel *gel, fz_matrix *ctm, float flatness, return bezier(gel, ctm, flatness, xabcd, yabcd, xbcd, ybcd, xcd, ycd, xd, yd); } -fz_error * +fz_error fz_fillpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness) { - fz_error *error; + fz_error error; float x1, y1, x2, y2, x3, y3; float cx = 0; float cy = 0; diff --git a/fitzdraw/pathscan.c b/fitzdraw/pathscan.c index 647b872f..dec7c73f 100644 --- a/fitzdraw/pathscan.c +++ b/fitzdraw/pathscan.c @@ -12,7 +12,7 @@ enum { HSCALE = 17, VSCALE = 15, SF = 1 }; * See Mike Abrash -- Graphics Programming Black Book (notably chapter 40) */ -fz_error * +fz_error fz_newgel(fz_gel **gelp) { fz_gel *gel; @@ -108,7 +108,7 @@ cliplerpx(int val, int m, int x0, int y0, int x1, int y1, int *out) } } -fz_error * +fz_error fz_insertgel(fz_gel *gel, float fx0, float fy0, float fx1, float fy1) { fz_edge *edge; @@ -237,7 +237,7 @@ fz_sortgel(fz_gel *gel) * Active Edge List -- keep track of active edges while sweeping */ -fz_error * +fz_error fz_newael(fz_ael **aelp) { fz_ael *ael; @@ -297,7 +297,7 @@ sortael(fz_edge **a, int n) } } -static fz_error * +static fz_error insertael(fz_ael *ael, fz_gel *gel, int y, int *e) { /* insert edges that start here */ @@ -452,11 +452,11 @@ static inline void blit(fz_pixmap *pix, int x, int y, fz_path_1c1(list, cov, len, dst); } -fz_error * +fz_error fz_scanconvert(fz_gel *gel, fz_ael *ael, int eofill, fz_irect clip, fz_pixmap *pix, unsigned char *argb, int over) { - fz_error *error; + fz_error error; unsigned char *deltas; int y, e; int yd, yc; diff --git a/fitzdraw/pathstroke.c b/fitzdraw/pathstroke.c index 1c5c7a6c..7b560313 100644 --- a/fitzdraw/pathstroke.c +++ b/fitzdraw/pathstroke.c @@ -26,7 +26,7 @@ struct sctx fz_point cur; }; -static fz_error * +static fz_error line(struct sctx *s, float x0, float y0, float x1, float y1) { float tx0 = s->ctm->a * x0 + s->ctm->c * y0 + s->ctm->e; @@ -36,13 +36,13 @@ line(struct sctx *s, float x0, float y0, float x1, float y1) return fz_insertgel(s->gel, tx0, ty0, tx1, ty1); } -static fz_error * +static fz_error arc(struct sctx *s, float xc, float yc, float x0, float y0, float x1, float y1) { - fz_error *error; + fz_error error; float th0, th1, r; float theta; float ox, oy, nx, ny; @@ -85,10 +85,10 @@ arc(struct sctx *s, return fz_okay; } -static fz_error * +static fz_error linestroke(struct sctx *s, fz_point a, fz_point b) { - fz_error *error; + fz_error error; float dx = b.x - a.x; float dy = b.y - a.y; @@ -105,10 +105,10 @@ linestroke(struct sctx *s, fz_point a, fz_point b) return fz_okay; } -static fz_error * +static fz_error linejoin(struct sctx *s, fz_point a, fz_point b, fz_point c) { - fz_error *error; + fz_error error; float miterlimit = s->miterlimit; float linewidth = s->linewidth; int linejoin = s->linejoin; @@ -208,10 +208,10 @@ linejoin(struct sctx *s, fz_point a, fz_point b, fz_point c) return fz_okay; } -static fz_error * +static fz_error linecap(struct sctx *s, fz_point a, fz_point b) { - fz_error *error; + fz_error error; float flatness = s->flatness; float linewidth = s->linewidth; int linecap = s->linecap; @@ -268,10 +268,10 @@ linecap(struct sctx *s, fz_point a, fz_point b) return fz_okay; } -static fz_error * +static fz_error linedot(struct sctx *s, fz_point a) { - fz_error *error; + fz_error error; float flatness = s->flatness; float linewidth = s->linewidth; int n = ceil(M_PI / (M_SQRT2 * sqrt(flatness / linewidth))); @@ -295,10 +295,10 @@ linedot(struct sctx *s, fz_point a) return fz_okay; } -static fz_error * +static fz_error strokeflush(struct sctx *s) { - fz_error *error; + fz_error error; if (s->sn == 2) { @@ -318,10 +318,10 @@ strokeflush(struct sctx *s) return fz_okay; } -static fz_error * +static fz_error strokemoveto(struct sctx *s, fz_point cur) { - fz_error *error; + fz_error error; error = strokeflush(s); if (error) return error; @@ -334,10 +334,10 @@ strokemoveto(struct sctx *s, fz_point cur) return fz_okay; } -static fz_error * +static fz_error strokelineto(struct sctx *s, fz_point cur) { - fz_error *error; + fz_error error; float dx = cur.x - s->seg[s->sn-1].x; float dy = cur.y - s->seg[s->sn-1].y; @@ -368,10 +368,10 @@ strokelineto(struct sctx *s, fz_point cur) return fz_okay; } -static fz_error * +static fz_error strokeclosepath(struct sctx *s) { - fz_error *error; + fz_error error; if (s->sn == 2) { @@ -398,14 +398,14 @@ strokeclosepath(struct sctx *s) return fz_okay; } -static fz_error * +static fz_error strokebezier(struct sctx *s, float xa, float ya, float xb, float yb, float xc, float yc, float xd, float yd) { - fz_error *error; + fz_error error; float dmax; float xab, yab; float xbc, ybc; @@ -457,10 +457,10 @@ strokebezier(struct sctx *s, return strokebezier(s, xabcd, yabcd, xbcd, ybcd, xcd, ycd, xd, yd); } -fz_error * +fz_error fz_strokepath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness, float linewidth) { - fz_error *error; + fz_error error; struct sctx s; fz_point p0, p1, p2, p3; int i; @@ -530,7 +530,7 @@ fz_strokepath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness, flo return strokeflush(&s); } -static fz_error * +static fz_error dashmoveto(struct sctx *s, fz_point a) { s->toggle = 1; @@ -554,10 +554,10 @@ dashmoveto(struct sctx *s, fz_point a) return fz_okay; } -static fz_error * +static fz_error dashlineto(struct sctx *s, fz_point b) { - fz_error *error; + fz_error error; float dx, dy; float total, used, ratio; fz_point a; @@ -600,14 +600,14 @@ dashlineto(struct sctx *s, fz_point b) return fz_okay; } -static fz_error * +static fz_error dashbezier(struct sctx *s, float xa, float ya, float xb, float yb, float xc, float yc, float xd, float yd) { - fz_error *error; + fz_error error; float dmax; float xab, yab; float xbc, ybc; @@ -657,10 +657,10 @@ dashbezier(struct sctx *s, return dashbezier(s, xabcd, yabcd, xbcd, ybcd, xcd, ycd, xd, yd); } -fz_error * +fz_error fz_dashpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness, float linewidth) { - fz_error *error; + fz_error error; struct sctx s; fz_point p0, p1, p2, p3, beg; int i; diff --git a/fitzdraw/pixmap.c b/fitzdraw/pixmap.c index 1c06505d..2103f59b 100644 --- a/fitzdraw/pixmap.c +++ b/fitzdraw/pixmap.c @@ -2,7 +2,7 @@ #include "fitz_tree.h" #include "fitz_draw.h" -fz_error * +fz_error fz_newpixmap(fz_pixmap **pixp, int x, int y, int w, int h, int n) { fz_pixmap *pix; @@ -26,7 +26,7 @@ fz_newpixmap(fz_pixmap **pixp, int x, int y, int w, int h, int n) return fz_okay; } -fz_error * +fz_error fz_newpixmapwithrect(fz_pixmap **pixp, fz_irect r, int n) { return fz_newpixmap(pixp, @@ -35,10 +35,10 @@ fz_newpixmapwithrect(fz_pixmap **pixp, fz_irect r, int n) r.y1 - r.y0, n); } -fz_error * +fz_error fz_newpixmapcopy(fz_pixmap **pixp, fz_pixmap *old) { - fz_error *error; + fz_error error; error = fz_newpixmap(pixp, old->x, old->y, old->w, old->h, old->n); if (error) return error; diff --git a/fitzdraw/render.c b/fitzdraw/render.c index acc2c723..133c5ed0 100644 --- a/fitzdraw/render.c +++ b/fitzdraw/render.c @@ -21,12 +21,12 @@ #define FOVER 1 #define FRGB 4 -static fz_error *rendernode(fz_renderer *gc, fz_node *node, fz_matrix ctm); +static fz_error rendernode(fz_renderer *gc, fz_node *node, fz_matrix ctm); -fz_error * +fz_error fz_newrenderer(fz_renderer **gcp, fz_colorspace *pcm, int maskonly, int gcmem) { - fz_error *error; + fz_error error; fz_renderer *gc; gc = fz_malloc(sizeof(fz_renderer)); @@ -91,10 +91,10 @@ fz_droprenderer(fz_renderer *gc) * Transform */ -static fz_error * +static fz_error rendertransform(fz_renderer *gc, fz_transformnode *transform, fz_matrix ctm) { - fz_error *error; + fz_error error; DEBUG("transform [%g %g %g %g %g %g]\n", transform->m.a, transform->m.b, transform->m.c, transform->m.d, @@ -110,10 +110,10 @@ DEBUG("}\n"); * Color */ -static fz_error * +static fz_error rendersolid(fz_renderer *gc, fz_solidnode *solid, fz_matrix ctm) { - fz_error *error; + fz_error error; float rgb[3]; unsigned char a, r, g, b; unsigned char *p; @@ -184,10 +184,10 @@ DEBUG("solid %s [%d %d %d %d];\n", solid->cs->name, gc->argb[0], gc->argb[1], gc * Path */ -static fz_error * +static fz_error renderpath(fz_renderer *gc, fz_pathnode *path, fz_matrix ctm) { - fz_error *error; + fz_error error; float flatness; fz_irect gbox; fz_irect clip; @@ -307,10 +307,10 @@ static void drawglyph(fz_renderer *gc, fz_pixmap *dst, fz_glyph *src, int xorig, } } -static fz_error * +static fz_error rendertext(fz_renderer *gc, fz_textnode *text, fz_matrix ctm) { - fz_error *error; + fz_error error; fz_irect tbox; fz_irect clip; fz_matrix tm, trm; @@ -385,10 +385,10 @@ calcimagescale(fz_matrix ctm, int w, int h, int *odx, int *ody) *ody = dy; } -static fz_error * +static fz_error renderimage(fz_renderer *gc, fz_imagenode *node, fz_matrix ctm) { - fz_error *error; + fz_error error; fz_image *image = node->image; fz_irect bbox; fz_irect clip; @@ -565,10 +565,10 @@ cleanup: * Shade */ -static fz_error * +static fz_error rendershade(fz_renderer *gc, fz_shadenode *node, fz_matrix ctm) { - fz_error *error; + fz_error error; fz_irect bbox; assert(!gc->maskonly); @@ -682,10 +682,10 @@ blendmask(fz_renderer *gc, fz_pixmap *src, fz_pixmap *msk, fz_pixmap *dst, int o } } -static fz_error * +static fz_error renderover(fz_renderer *gc, fz_overnode *over, fz_matrix ctm) { - fz_error *error; + fz_error error; fz_node *child; int cluster = 0; @@ -727,10 +727,10 @@ DEBUG("}\n"); return fz_okay; } -static fz_error * +static fz_error rendermask(fz_renderer *gc, fz_masknode *mask, fz_matrix ctm) { - fz_error *error; + fz_error error; int oldmaskonly; fz_pixmap *oldover; fz_irect oldclip; @@ -851,7 +851,7 @@ cleanup: * Dispatch */ -static fz_error * +static fz_error rendernode(fz_renderer *gc, fz_node *node, fz_matrix ctm) { if (!node) @@ -888,12 +888,12 @@ rendernode(fz_renderer *gc, fz_node *node, fz_matrix ctm) return fz_okay; } -fz_error * +fz_error fz_rendertree(fz_pixmap **outp, fz_renderer *gc, fz_tree *tree, fz_matrix ctm, fz_irect bbox, int white) { - fz_error *error; + fz_error error; gc->clip = bbox; gc->over = nil; @@ -933,10 +933,10 @@ DEBUG("}\n"); return fz_okay; } -fz_error * +fz_error fz_rendertreeover(fz_renderer *gc, fz_pixmap *dest, fz_tree *tree, fz_matrix ctm) { - fz_error *error; + fz_error error; assert(!gc->maskonly); assert(dest->n == 4); |