Mercurial > MadButterfly
comparison src/shape_path.c @ 34:07c523c799f4
Fix bug of relative path command
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 06 Aug 2008 01:10:32 +0800 |
parents | d82749f77108 |
children | 1ca417f741f1 |
comparison
equal
deleted
inserted
replaced
33:d82749f77108 | 34:07c523c799f4 |
---|---|
462 cairo_line_to(cr, x, y); | 462 cairo_line_to(cr, x, y); |
463 break; | 463 break; |
464 case 'c': | 464 case 'c': |
465 x1 = x + *args++; | 465 x1 = x + *args++; |
466 y1 = y + *args++; | 466 y1 = y + *args++; |
467 x2 = x1 + *args++; | 467 x2 = x + *args++; |
468 y2 = y1 + *args++; | 468 y2 = y + *args++; |
469 x = x2 + *args++; | 469 x = x + *args++; |
470 y = y2 + *args++; | 470 y = y + *args++; |
471 cairo_curve_to(cr, x1, y1, x2, y2, x, y); | 471 cairo_curve_to(cr, x1, y1, x2, y2, x, y); |
472 break; | 472 break; |
473 case 'C': | 473 case 'C': |
474 x1 = *args++; | 474 x1 = *args++; |
475 y1 = *args++; | 475 y1 = *args++; |
480 cairo_curve_to(cr, x1, y1, x2, y2, x, y); | 480 cairo_curve_to(cr, x1, y1, x2, y2, x, y); |
481 break; | 481 break; |
482 case 's': | 482 case 's': |
483 x1 = x + x - x2; | 483 x1 = x + x - x2; |
484 y1 = y + y - y2; | 484 y1 = y + y - y2; |
485 x2 = x1 + *args++; | 485 x2 = x + *args++; |
486 y2 = y1 + *args++; | 486 y2 = y + *args++; |
487 x = x2 + *args++; | 487 x = x + *args++; |
488 y = y2 + *args++; | 488 y = y + *args++; |
489 cairo_curve_to(cr, x1, y1, x2, y2, x, y); | 489 cairo_curve_to(cr, x1, y1, x2, y2, x, y); |
490 break; | 490 break; |
491 case 'S': | 491 case 'S': |
492 x1 = x + x - x2; | 492 x1 = x + x - x2; |
493 y1 = y + y - y2; | 493 y1 = y + y - y2; |
500 case 'q': | 500 case 'q': |
501 x1 = x + *args++; | 501 x1 = x + *args++; |
502 y1 = y + *args++; | 502 y1 = y + *args++; |
503 x2 = x1; | 503 x2 = x1; |
504 y2 = y1; | 504 y2 = y1; |
505 x = x2 + *args++; | 505 x = x + *args++; |
506 y = y2 + *args++; | 506 y = y + *args++; |
507 cairo_curve_to(cr, x1, y1, x2, y2, x, y); | 507 cairo_curve_to(cr, x1, y1, x2, y2, x, y); |
508 break; | 508 break; |
509 case 'Q': | 509 case 'Q': |
510 x1 = *args++; | 510 x1 = *args++; |
511 y1 = *args++; | 511 y1 = *args++; |
518 case 't': | 518 case 't': |
519 x1 = x + x - x2; | 519 x1 = x + x - x2; |
520 y1 = y + y - y2; | 520 y1 = y + y - y2; |
521 x2 = x1; | 521 x2 = x1; |
522 y2 = y1; | 522 y2 = y1; |
523 x = x2 + *args++; | 523 x = x + *args++; |
524 y = y2 + *args++; | 524 y = y + *args++; |
525 cairo_curve_to(cr, x1, y1, x2, y2, x, y); | 525 cairo_curve_to(cr, x1, y1, x2, y2, x, y); |
526 break; | 526 break; |
527 case 'T': | 527 case 'T': |
528 x1 = x + x - x2; | 528 x1 = x + x - x2; |
529 y1 = y + y - y2; | 529 y1 = y + y - y2; |