Commit 659e86b
committed
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 17916d6 commit 659e86b
2 files changed
+4
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23194 | 23194 | | |
23195 | 23195 | | |
23196 | 23196 | | |
23197 | | - | |
23198 | | - | |
23199 | | - | |
23200 | | - | |
23201 | | - | |
| 23197 | + | |
23202 | 23198 | | |
23203 | 23199 | | |
23204 | 23200 | | |
| |||
23214 | 23210 | | |
23215 | 23211 | | |
23216 | 23212 | | |
23217 | | - | |
| 23213 | + | |
23218 | 23214 | | |
23219 | 23215 | | |
23220 | 23216 | | |
| |||
| 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