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

SVG symbol gets clipped when rotated #5264

Merged
merged 1 commit into from Sep 20, 2016

Conversation

Projects
None yet
3 participants
@tbonfort
Member

tbonfort commented Mar 23, 2016

Non-square SVG symbols are clipped when they are rotated.

Here is an example where a small box of 40x20 pixel is rotated by 45 and 90 degrees:

out

Here is the Mapfile and SVG symbol:
https://gist.github.com/olt/2a345fe22653cd021c29

Tested this with current master, 7.0.1 and 6.4.3 (shp2img -m clipped-symbol.map -o out.png).

olt added a commit to olt/mapserver that referenced this pull request Mar 23, 2016

@olt

This comment has been minimized.

Show comment
Hide comment
@olt

olt Mar 23, 2016

Contributor

Found the issue. The surface size in msRenderRasterizedSVGSymbol is too small. There is a compensation for 45 degree rotations, but it fails for larger rotations.

Here is a short fix:
olt@3b9364e

Contributor

olt commented Mar 23, 2016

Found the issue. The surface size in msRenderRasterizedSVGSymbol is too small. There is a compensation for 45 degree rotations, but it fails for larger rotations.

Here is a short fix:
olt@3b9364e

olt added a commit to olt/mapserver that referenced this pull request Mar 23, 2016

tbonfort added a commit to tbonfort/mapserver that referenced this pull request Mar 23, 2016

@tbonfort tbonfort self-assigned this Jun 29, 2016

@tbonfort tbonfort added this to the 7.0.2 Release milestone Jun 29, 2016

@jmckenna

This comment has been minimized.

Show comment
Hide comment
@jmckenna

jmckenna Sep 20, 2016

Member

I've tested this fix on Ubuntu through librsvg with branch-7.0 + this change. Is this ok to merge?
ttt

Member

jmckenna commented Sep 20, 2016

I've tested this fix on Ubuntu through librsvg with branch-7.0 + this change. Is this ok to merge?
ttt

@jmckenna jmckenna merged commit e03ca4b into mapserver:branch-7-0 Sep 20, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@jmckenna

This comment has been minimized.

Show comment
Hide comment
@jmckenna

jmckenna Sep 20, 2016

Member

thanks @olt !

Member

jmckenna commented Sep 20, 2016

thanks @olt !

tbonfort added a commit that referenced this pull request Sep 20, 2016

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Sep 20, 2016

Member

A PR which breaks tests isn't ready for inclusion, please wait for confirmation before merging PRs you are not affiliated with. Fix added in 45b3917

Member

tbonfort commented Sep 20, 2016

A PR which breaks tests isn't ready for inclusion, please wait for confirmation before merging PRs you are not affiliated with. Fix added in 45b3917

@tbonfort tbonfort deleted the tbonfort:clipped-symbols-5264 branch Sep 20, 2016

@jmckenna

This comment has been minimized.

Show comment
Hide comment
@jmckenna

jmckenna Sep 20, 2016

Member

for the record i had begun looking at the 2 errors reported by msautotest. thanks for the fix.

Member

jmckenna commented Sep 20, 2016

for the record i had begun looking at the 2 errors reported by msautotest. thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment