diff options
-rw-r--r-- | fitz/base_object.c | 2 | ||||
-rw-r--r-- | fitz/res_font.c | 18 | ||||
-rw-r--r-- | pdf/pdf_function.c | 11 | ||||
-rw-r--r-- | xps/xps_path.c | 32 |
4 files changed, 36 insertions, 27 deletions
diff --git a/fitz/base_object.c b/fitz/base_object.c index 33b567d6..4037c871 100644 --- a/fitz/base_object.c +++ b/fitz/base_object.c @@ -156,7 +156,7 @@ int fz_is_indirect(fz_obj *obj) #define RESOLVE(obj) \ do { if (obj && obj->kind == FZ_INDIRECT) \ - obj = fz_resolve_indirect(obj); \ + obj = fz_resolve_indirect(obj); \ } while (0) int fz_is_null(fz_obj *obj) diff --git a/fitz/res_font.c b/fitz/res_font.c index 6db1f07d..7bc8f48b 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -487,16 +487,18 @@ fz_render_ft_stroked_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix tr } #if 0 - line_join = state->linejoin == FZ_LINEJOIN_MITER ? FT_STROKER_LINEJOIN_MITER_FIXED : - state->linejoin == FZ_LINEJOIN_ROUND ? FT_STROKER_LINEJOIN_ROUND : - state->linejoin == FZ_LINEJOIN_BEVEL ? FT_STROKER_LINEJOIN_BEVEL : - FT_STROKER_LINEJOIN_MITER_VARIABLE; + line_join = + state->linejoin == FZ_LINEJOIN_MITER ? FT_STROKER_LINEJOIN_MITER_FIXED : + state->linejoin == FZ_LINEJOIN_ROUND ? FT_STROKER_LINEJOIN_ROUND : + state->linejoin == FZ_LINEJOIN_BEVEL ? FT_STROKER_LINEJOIN_BEVEL : + FT_STROKER_LINEJOIN_MITER_VARIABLE; #else /* Until we upgrade freetype */ - line_join = state->linejoin == FZ_LINEJOIN_MITER ? FT_STROKER_LINEJOIN_MITER : - state->linejoin == FZ_LINEJOIN_ROUND ? FT_STROKER_LINEJOIN_ROUND : - state->linejoin == FZ_LINEJOIN_BEVEL ? FT_STROKER_LINEJOIN_BEVEL : - FT_STROKER_LINEJOIN_MITER; + line_join = + state->linejoin == FZ_LINEJOIN_MITER ? FT_STROKER_LINEJOIN_MITER : + state->linejoin == FZ_LINEJOIN_ROUND ? FT_STROKER_LINEJOIN_ROUND : + state->linejoin == FZ_LINEJOIN_BEVEL ? FT_STROKER_LINEJOIN_BEVEL : + FT_STROKER_LINEJOIN_MITER; #endif FT_Stroker_Set(stroker, linewidth, state->start_cap, line_join, state->miterlimit * 65536); diff --git a/pdf/pdf_function.c b/pdf/pdf_function.c index 61682ac2..7111cae7 100644 --- a/pdf/pdf_function.c +++ b/pdf/pdf_function.c @@ -1425,11 +1425,12 @@ pdf_load_function(pdf_xref *xref, fz_obj *dict) int type = func->type; pdf_drop_function(ctx, func); fz_throw(ctx, "cannot load %s function (%d %d R)", - (type == SAMPLE ? "sampled" : - (type == EXPONENTIAL ? "exponential" : - (type == STITCHING ? "stitching" : - (type == POSTSCRIPT ? "calculator" : - "unknown")))), fz_to_num(dict), fz_to_gen(dict)); + type == SAMPLE ? "sampled" : + type == EXPONENTIAL ? "exponential" : + type == STITCHING ? "stitching" : + type == POSTSCRIPT ? "calculator" : + "unknown", + fz_to_num(dict), fz_to_gen(dict)); } return func; diff --git a/xps/xps_path.c b/xps/xps_path.c index e3dff868..c49a55a6 100644 --- a/xps/xps_path.c +++ b/xps/xps_path.c @@ -128,21 +128,27 @@ angle_between(const fz_point u, const fz_point v) return sign * acosf(t); } -/* Some explaination of the parameters here is warranted. See: - * http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes - * Add an arc segment to path, that describes a section of an elliptical arc - * from the current point of path to (point_x,point_y), such that: - * the arc segment is taken from an elliptical arc of semi major radius - * size_x, semi minor radius size_y, where the semi major axis of the - * ellipse is rotated by rotation_angle. - * if is_large_arc, then the arc segment is selected to be > 180 degrees. - * if is_clockwise, then the arc sweeps clockwise. - */ +/* + Some explaination of the parameters here is warranted. See: + + http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes + + Add an arc segment to path, that describes a section of an elliptical + arc from the current point of path to (point_x,point_y), such that: + + The arc segment is taken from an elliptical arc of semi major radius + size_x, semi minor radius size_y, where the semi major axis of the + ellipse is rotated by rotation_angle. + + If is_large_arc, then the arc segment is selected to be > 180 degrees. + + If is_clockwise, then the arc sweeps clockwise. +*/ static void xps_draw_arc(fz_context *doc, fz_path *path, - float size_x, float size_y, float rotation_angle, - int is_large_arc, int is_clockwise, - float point_x, float point_y) + float size_x, float size_y, float rotation_angle, + int is_large_arc, int is_clockwise, + float point_x, float point_y) { fz_matrix rotmat, revmat; fz_matrix mtx; |