Commit d6736b1
committed
Fix: Ensure correct image transform in SVG export
Modified SvgDrawController.drawImage to correctly convert image
coordinates, dimensions, and rotation from world space to SVG screen space.
This involves:
- Scaling dimensions by the screen scale.
- Transforming the image center to target SVG coordinates.
- Calculating SVG x, y for the <image> tag based on the transformed center.
- Applying rotation in degrees around the transformed center.
This change addresses issue #18 where images were not appearing correctly
in exported SVG files due to improper coordinate handling.1 parent b89cb4d commit d6736b1
1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
243 | 256 | | |
244 | 257 | | |
245 | 258 | | |
246 | | - | |
| 259 | + | |
247 | 260 | | |
248 | 261 | | |
249 | 262 | | |
| |||
0 commit comments