Perspective doesn't factor in transforms correctly (regression)

Steps to reproduce:

  • Open inkscape-test-perspective.svg
  • Select the red shape and using shift key, select the black path
  • Apply Extension -> Modify Path -> Perspective

What happened?

Shape is drawn somewhere outside selection and also shape is random, not what it should be.

This is due to the transform="scale(0.26458333)" applied to the red path (translate and presumably all transforms are affected).

before after
inkscape-test-perspective.svg image inkscape-test-perspective-result.svg

What should have happened?

Expected result: Here is how it looks on older versions (or if the path was nudged before applying the extension.

image

Inkscape Version and Operating System:

  • Inkscape Version: 1.0 (4035a4fb49, 2020-05-01)
  • Operating System: Windows 10 Home (64 bit)
  • Operating System version: 1909
Edited by Nathan Lee