Commit 0f65399
Fix incorrect lineJoin and pathfactor in get_drawings()
Bug 1: lineJoin was multiplied by pathfactor. stroke->linejoin is an
enum (0=Miter, 1=Round, 2=Bevel) and should not be scaled. Note that
lineCap is already correctly handled as plain integers without
pathfactor multiplication.
Bug 2: pathfactor calculation only handled some transform patterns
correctly. Use sqrt(abs(a*d - b*c)) so uniform scaling with arbitrary
rotation is handled correctly; for non-uniform scaling this yields the
geometric mean of the scale factors.
Fixed in:
- src/extra.i (rebased build)
- src/__init__.py (Python fallback)1 parent 0e4e38b commit 0f65399
2 files changed
Lines changed: 4 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23210 | 23210 | | |
23211 | 23211 | | |
23212 | 23212 | | |
23213 | | - | |
23214 | | - | |
23215 | | - | |
23216 | | - | |
23217 | | - | |
| 23213 | + | |
23218 | 23214 | | |
23219 | 23215 | | |
23220 | 23216 | | |
| |||
23230 | 23226 | | |
23231 | 23227 | | |
23232 | 23228 | | |
23233 | | - | |
| 23229 | + | |
23234 | 23230 | | |
23235 | 23231 | | |
23236 | 23232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2719 | 2719 | | |
2720 | 2720 | | |
2721 | 2721 | | |
2722 | | - | |
2723 | | - | |
2724 | | - | |
2725 | | - | |
2726 | | - | |
2727 | | - | |
2728 | | - | |
2729 | | - | |
| 2722 | + | |
2730 | 2723 | | |
2731 | 2724 | | |
2732 | 2725 | | |
| |||
2739 | 2732 | | |
2740 | 2733 | | |
2741 | 2734 | | |
2742 | | - | |
| 2735 | + | |
2743 | 2736 | | |
2744 | 2737 | | |
2745 | 2738 | | |
| |||
0 commit comments