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

Group with shapes having strokes clipped with crema #52

Open
dirkschulze opened this issue Sep 7, 2014 · 6 comments
Open

Group with shapes having strokes clipped with crema #52

dirkschulze opened this issue Sep 7, 2014 · 6 comments

Comments

@dirkschulze
Copy link
Contributor

If I export a group that has shapes with strokes in it, then the stroke is clipped at the outer edges of the document. This is because we do not apply the stroke-width/2 offset around the shapes to preserve the stroke. PS does not have this in the boundaries, because inner stroke is the default.

@dirkschulze dirkschulze added the bug label Sep 7, 2014
@jhatwich
Copy link
Contributor

jhatwich commented Sep 7, 2014

@dirkschulze is this in the case when we are isolating a single layer or for a whole document? I don't see the problem if I do an isolated layer export of a single shape (because we do shift the bounds in that case).

@dirkschulze
Copy link
Contributor Author

I tried it with this example: http://adobe.ly/1xryPBh (which requires issue #51 to be fixed). I exported the group layer and the stroke was clipped. Ot better, the size of the SVG document was smaller than the group + half stroke width.

@nimbupani
Copy link
Contributor

There is a similar-ish issue reported by @dantz in this PSD http://adobe.ly/ZRnTOU the paths are getting clipped for some reason. Can someone investigate? @joebowden

@jhatwich
Copy link
Contributor

jhatwich commented Oct 9, 2014

We are padding the bounds appropriately, but the path is not positioned properly within the bounds. This only affects paths, not simple shapes. We should probably stop using the pre-computed SVG path data and render that from raw info. It would be more efficient and would allow us to shift the path as needed.

@dirkschulze
Copy link
Contributor Author

Hm, but for basic shapes we mostly do that already, no? So are you suggesting to get the actual path data and not the prepared path data? If so, how do we get access to it?

@jhatwich
Copy link
Contributor

jhatwich commented Oct 9, 2014

Yeah we do it for basic shapes. There is a flag to get the raw path data in getDocumentInfo. I've started using that - if you look at my transforms PR it is using that data to decide whether the shape has been transformed.

@nimbupani nimbupani added this to the Dot Release post MAX milestone Oct 11, 2014
dirkschulze added a commit that referenced this issue Jun 16, 2015
Remove useless 'size' property from matrix
dirkschulze added a commit that referenced this issue Aug 24, 2015
Add support for transforms to gradients. Fixes issue #52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants