View Full Version : Text label along a line
02-06-2012, 03:13 PM
I would like to place a text label along a line.
This line is defined by two points (with x,y,z).
How can I tell the renderer to display a text,
which is aligned to that line or any other
geometric shape ?
02-07-2012, 02:00 PM
You have to manage two separate renderables such as polyline and userfacingtext.
Then you could position the text based on an offset from your lines "getReferencePosition"
02-07-2012, 03:52 PM
Ok, but how can I tell the UserfacingText about my rotation angle ?
My aim is to let the text appear along a line which may link the lower left corner with the upper right corner of a rectangle. This line is not a horizontal one. How can I display a text that starts at the lower left corner and has a direction, pointing to the upper right corner ? This text object should provide a method like "setRotationangle(45.0) as I would expect.
02-07-2012, 05:44 PM
ohh ok i get what you want now.
You need text that is clamped to the ground at the same angle as your line.
The GeographicTextRenderer is focused on always presenting text to the user in a way they could read it(no angles or possibility of being upside down) so I believe you're going to have to implement this yourself, possibly making a SurfaceText renderable.
vBulletin® v3.7.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.