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

Fix scaling the legend and scalebar when the resolution is changing (#5029) #5035

Closed
wants to merge 1 commit into from

Conversation

szekerest
Copy link
Member

No description provided.

@tbonfort
Copy link
Member

The autotests are failing with this patch:

######################################
# renderers => legend_resolution_point_4.png
######################################
compare: image widths or heights differ `../expected/legend_resolution_point_4.png' @ error/compare.c/CompareImageCommand/957.
######################################
# renderers => legend_resolution_point_2.png
######################################
compare: image widths or heights differ `../expected/legend_resolution_point_2.png' @ error/compare.c/CompareImageCommand/957.

it would seem that the images are created with a size different than what was requested.

@szekerest
Copy link
Member Author

@tbonfort I noticed the failure, but I might think that it could be a correct result however. Images at a higher resolution should be proportionally larger in order to keep the same look.

@tbonfort
Copy link
Member

Let me disagree. If the user requests a 50x50 image he should get back a 50x50 image. If he wants a similar hi-res image, he should request a 100x100 image and a higher dpi.

@szekerest
Copy link
Member Author

I understand what you mention, but in this case we are talking about the keysize (what is expected), but the autotest check is about the legend image size, which is not the same as the keysize. For example the actual image size for legend_resolution_point_4.png seems to be 199x90 and that won't necessary be the same after the patch, since we also want keysize/keyspacing/hMargin/vMargin to grow proportionally along with the resolution factor.
It is also a theoretical question whether we would want to let the user calculate all these modified parameters externally, or let mapserver to do that so setting the resolution factor should behave something like the symbolscale setting currently. That means the specified keysize would be the same as the pixel size only if the resolution/defresolution =1
But anyway this patch should be refined indeed.

@mapserver-bot
Copy link

This is an automated comment

This issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen with missing/relevant information if still valid.

Typically, issues fall in this state for one of the following reasons:

  • Hard, impossible or not enough information to reproduce
  • Missing test case
  • Lack of a champion with interest and/or funding to address the issue

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

Successfully merging this pull request may close these issues.

None yet

3 participants