Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong position with svg imported embedded Raster with transform="matrix()" #1328

Closed
s-light opened this issue May 17, 2017 · 7 comments
Closed

Comments

@s-light
Copy link

s-light commented May 17, 2017

i found a bug that has to do with if an svg element has an transform="matrix(0.21 0 0 0.21 43.54 43.531)" in it.

example at sketch.paperjs.org

if i import this file shadowtest_transformmatrix.svg
i get
image

but i would expect
image

this transform arrangement can happen with illustrator exports (there i originally found it)
if i open such a file in inkscape and move the 'shadow image' one step left and one step back inkscape converts the transform matrix into x and y values. if i save this and try with it all is fine again.

i have not tested if this happens with not-Raster items too.

@blayzen-w
Copy link

This has been reported in the past and it looks like its from the transformation on the embedded image is applied twice or is done incorrectly if a transformation is applied in the onLoad function. @lilltiger found a fix for it by wrapping the content in the onLoad in a timeout.

See: #1192

+1 would like to see this fixed

@sapics
Copy link
Member

sapics commented Oct 4, 2018

This is fixed in #1452. You can check it in prebuilt version of sketch.

@sapics sapics closed this as completed Oct 4, 2018
@lehni
Copy link
Member

lehni commented Oct 4, 2018

@sapics great idea about the prebuilt sketch! We should maybe have a pulldown on sketch itself where versions can be selected, prebuilt being one of them.

@sapics
Copy link
Member

sapics commented Oct 4, 2018

I totally agree with you! It is the one!

@s-light
Copy link
Author

s-light commented Oct 4, 2018

thanks for fixing this 👍

@sapics
Copy link
Member

sapics commented Oct 5, 2018

@lehni I would like to create a code for We should maybe have a pulldown on sketch itself where versions can be selected, prebuilt being one of them. Is it OK?

@sapics
Copy link
Member

sapics commented Oct 5, 2018

I create a PR in paperjs/sketch.paperjs.org#4 to execute paparscript in multi-version of paperjs .
You can preview the result in https://raw.githack.com/sapics/sketch.paperjs.org/feature/multi-version2/index.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants