How to align text inside a GnomeCanvas text element

I would like to have a GnomeCanvas text element and according to its content (and content language) decide whether the text should be right-aligned or left-aligned. I found one way to do this by changing the anchor property, but using that method would require me to occupy the anchor position myself (change it to the right of the text's bounding rectangle when aligning to the right) and there seems to be an easier way.

EDIT: I see that there is also a justification property that allows text to be justified to the right. However, I still need to set the anchor point to match the language, instead of setting the bounding box, which is applicable to any language.

+1


source to share


1 answer


Its about a month with no other answer. I guess my first understanding was correct and there is no other way with canvas. My solution would be to change the anchor to east and change the anchor point accordingly.



0


source







All Articles