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

SVG symbol gets clipped when rotated #5264

Merged
merged 1 commit into from Sep 20, 2016
Merged

SVG symbol gets clipped when rotated #5264

merged 1 commit into from Sep 20, 2016

Conversation

tbonfort
Copy link
Member

@tbonfort 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
Copy link
Contributor Author

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 tbonfort self-assigned this Jun 29, 2016
@tbonfort tbonfort added this to the 7.0.2 Release milestone Jun 29, 2016
@jmckenna
Copy link
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
@jmckenna
Copy link
Member

jmckenna commented Sep 20, 2016

thanks @olt !

tbonfort added a commit that referenced this pull request Sep 20, 2016
@tbonfort
Copy link
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 clipped-symbols-5264 branch Sep 20, 2016
@jmckenna
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants