# HG changeset patch # User Thinker K.F. Li # Date 1217956232 -28800 # Node ID 07c523c799f4939b11965cd0edf4e83e69d0afff # Parent d82749f771088a1e6d09390e22e630a16077e663 Fix bug of relative path command diff -r d82749f77108 -r 07c523c799f4 src/shape_path.c --- a/src/shape_path.c Wed Aug 06 00:40:04 2008 +0800 +++ b/src/shape_path.c Wed Aug 06 01:10:32 2008 +0800 @@ -464,10 +464,10 @@ case 'c': x1 = x + *args++; y1 = y + *args++; - x2 = x1 + *args++; - y2 = y1 + *args++; - x = x2 + *args++; - y = y2 + *args++; + x2 = x + *args++; + y2 = y + *args++; + x = x + *args++; + y = y + *args++; cairo_curve_to(cr, x1, y1, x2, y2, x, y); break; case 'C': @@ -482,10 +482,10 @@ case 's': x1 = x + x - x2; y1 = y + y - y2; - x2 = x1 + *args++; - y2 = y1 + *args++; - x = x2 + *args++; - y = y2 + *args++; + x2 = x + *args++; + y2 = y + *args++; + x = x + *args++; + y = y + *args++; cairo_curve_to(cr, x1, y1, x2, y2, x, y); break; case 'S': @@ -502,8 +502,8 @@ y1 = y + *args++; x2 = x1; y2 = y1; - x = x2 + *args++; - y = y2 + *args++; + x = x + *args++; + y = y + *args++; cairo_curve_to(cr, x1, y1, x2, y2, x, y); break; case 'Q': @@ -520,8 +520,8 @@ y1 = y + y - y2; x2 = x1; y2 = y1; - x = x2 + *args++; - y = y2 + *args++; + x = x + *args++; + y = y + *args++; cairo_curve_to(cr, x1, y1, x2, y2, x, y); break; case 'T': diff -r d82749f77108 -r 07c523c799f4 src/shape_rect.c --- a/src/shape_rect.c Wed Aug 06 00:40:04 2008 +0800 +++ b/src/shape_rect.c Wed Aug 06 01:10:32 2008 +0800 @@ -6,5 +6,11 @@ shape_t shape; co_aix x, y; co_aix rx, ry; + co_aix d_x, d_y; + co_aix d_rx, d_ry; } sh_rect_t; +extern void sh_rect_transform(shape_t *shape) { + sh_rect_t *rect = (sh_rect_t *)shape; + +}