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

[rotation] prevent rotation of labels when placed around or over a point / centroid #1750

Closed
wants to merge 1 commit into from

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Jan 3, 2015

Right now, only the labels which are set to horizontal placement are displayed to the horizontal of the canvas. That behavior should be extended to labels with placement set to be around point/centroid of offset of point/centroid. This pull request does it in the simplest of ways.

Right now, this is how things look for labels placed around point / centroid when rotation value is 45 degrees:
45_rotation-current_label

With my pull request applied, the labels placed around point / centroid with rotation value of 45 are rendered as such:
45_rotation-proposed_label

Is far from perfect, as long labels can look detached from respective points (see the Chamka Chrey Khang Tbong label and its triangle point below it, quite far when compared to other labels for the triangle symbology). But to fix that, it'll probably require a much deeper refactoring.

This patch is a quick band-aid until a deeper code change occurs.

@dakcarto , @strk , could we apply this for the immediate benefits prior to a bigger re-thinking of how rotated labels should work?

@strk
Copy link
Contributor

strk commented Jan 8, 2015

I'd agree about applying this one as the refactoring of labeling engine isn't straightforward: http://hub.qgis.org/issues/11814

@strk
Copy link
Contributor

strk commented Jan 8, 2015

Well, I've pushed this as 8f70664

@strk strk closed this Jan 8, 2015
@nirvn nirvn deleted the rotated_label_improvement branch December 28, 2016 04:20
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

2 participants