diff options
Diffstat (limited to 'draw')
-rw-r--r-- | draw/imagedraw.c | 44 | ||||
-rw-r--r-- | draw/imagesmooth.c | 24 |
2 files changed, 34 insertions, 34 deletions
diff --git a/draw/imagedraw.c b/draw/imagedraw.c index 668bfd22..e93405e5 100644 --- a/draw/imagedraw.c +++ b/draw/imagedraw.c @@ -198,20 +198,20 @@ fz_paintaffinelerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int { switch (n) { - case 1: fz_paintaffineNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 1); break; - case 2: fz_paintaffineNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 2); break; - case 4: fz_paintaffineNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 4); break; - default: fz_paintaffineNlerp(dp, sp, sw, sh, u, v, fa, fb, w, n); break; + case 1: fz_paintaffineNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 1); break; + case 2: fz_paintaffineNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 2); break; + case 4: fz_paintaffineNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 4); break; + default: fz_paintaffineNlerp(dp, sp, sw, sh, u, v, fa, fb, w, n); break; } } else if (alpha > 0) { switch (n) { - case 1: fz_paintaffinealphaNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 1, alpha); break; - case 2: fz_paintaffinealphaNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 2, alpha); break; - case 4: fz_paintaffinealphaNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 4, alpha); break; - default: fz_paintaffinealphaNlerp(dp, sp, sw, sh, u, v, fa, fb, w, n, alpha); break; + case 1: fz_paintaffinealphaNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 1, alpha); break; + case 2: fz_paintaffinealphaNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 2, alpha); break; + case 4: fz_paintaffinealphaNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 4, alpha); break; + default: fz_paintaffinealphaNlerp(dp, sp, sw, sh, u, v, fa, fb, w, n, alpha); break; } } } @@ -223,20 +223,20 @@ fz_paintaffinenear(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int { switch (n) { - case 1: fz_paintaffineNnear(dp, sp, sw, sh, u, v, fa, fb, w, 1); break; - case 2: fz_paintaffineNnear(dp, sp, sw, sh, u, v, fa, fb, w, 2); break; - case 4: fz_paintaffineNnear(dp, sp, sw, sh, u, v, fa, fb, w, 4); break; - default: fz_paintaffineNnear(dp, sp, sw, sh, u, v, fa, fb, w, n); break; + case 1: fz_paintaffineNnear(dp, sp, sw, sh, u, v, fa, fb, w, 1); break; + case 2: fz_paintaffineNnear(dp, sp, sw, sh, u, v, fa, fb, w, 2); break; + case 4: fz_paintaffineNnear(dp, sp, sw, sh, u, v, fa, fb, w, 4); break; + default: fz_paintaffineNnear(dp, sp, sw, sh, u, v, fa, fb, w, n); break; } } else if (alpha > 0) { switch (n) { - case 1: fz_paintaffinealphaNnear(dp, sp, sw, sh, u, v, fa, fb, w, 1, alpha); break; - case 2: fz_paintaffinealphaNnear(dp, sp, sw, sh, u, v, fa, fb, w, 2, alpha); break; - case 4: fz_paintaffinealphaNnear(dp, sp, sw, sh, u, v, fa, fb, w, 4, alpha); break; - default: fz_paintaffinealphaNnear(dp, sp, sw, sh, u, v, fa, fb, w, n, alpha); break; + case 1: fz_paintaffinealphaNnear(dp, sp, sw, sh, u, v, fa, fb, w, 1, alpha); break; + case 2: fz_paintaffinealphaNnear(dp, sp, sw, sh, u, v, fa, fb, w, 2, alpha); break; + case 4: fz_paintaffinealphaNnear(dp, sp, sw, sh, u, v, fa, fb, w, 4, alpha); break; + default: fz_paintaffinealphaNnear(dp, sp, sw, sh, u, v, fa, fb, w, n, alpha); break; } } } @@ -246,9 +246,9 @@ fz_paintaffinecolorlerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa { switch (n) { - case 2: fz_paintaffinecolorNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 2, color); break; - case 4: fz_paintaffinecolorNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 4, color); break; - default: fz_paintaffinecolorNlerp(dp, sp, sw, sh, u, v, fa, fb, w, n, color); break; + case 2: fz_paintaffinecolorNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 2, color); break; + case 4: fz_paintaffinecolorNlerp(dp, sp, sw, sh, u, v, fa, fb, w, 4, color); break; + default: fz_paintaffinecolorNlerp(dp, sp, sw, sh, u, v, fa, fb, w, n, color); break; } } @@ -257,9 +257,9 @@ fz_paintaffinecolornear(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa { switch (n) { - case 2: fz_paintaffinecolorNnear(dp, sp, sw, sh, u, v, fa, fb, w, 2, color); break; - case 4: fz_paintaffinecolorNnear(dp, sp, sw, sh, u, v, fa, fb, w, 4, color); break; - default: fz_paintaffinecolorNnear(dp, sp, sw, sh, u, v, fa, fb, w, n, color); break; + case 2: fz_paintaffinecolorNnear(dp, sp, sw, sh, u, v, fa, fb, w, 2, color); break; + case 4: fz_paintaffinecolorNnear(dp, sp, sw, sh, u, v, fa, fb, w, 4, color); break; + default: fz_paintaffinecolorNnear(dp, sp, sw, sh, u, v, fa, fb, w, n, color); break; } } diff --git a/draw/imagesmooth.c b/draw/imagesmooth.c index 3807de9b..72345ed6 100644 --- a/draw/imagesmooth.c +++ b/draw/imagesmooth.c @@ -1113,18 +1113,18 @@ fz_smoothscalepixmap(fz_pixmap *src, float x, float y, float w, float h) goto cleanup; switch (src->n) { - default: - row_scale = scale_row_to_temp; - break; - case 1: /* Image mask case */ - row_scale = scale_row_to_temp1; - break; - case 2: /* Greyscale with alpha case */ - row_scale = scale_row_to_temp2; - break; - case 4: /* RGBA */ - row_scale = scale_row_to_temp4; - break; + default: + row_scale = scale_row_to_temp; + break; + case 1: /* Image mask case */ + row_scale = scale_row_to_temp1; + break; + case 2: /* Greyscale with alpha case */ + row_scale = scale_row_to_temp2; + break; + case 4: /* RGBA */ + row_scale = scale_row_to_temp4; + break; } max_row = 0; for (row = 0; row < contrib_rows->count; row++) |