comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » textbaseline property not inherited by IDLgrText when specified in IDLgrAxis?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
textbaseline property not inherited by IDLgrText when specified in IDLgrAxis? [message #78925] Tue, 10 January 2012 08:02 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
Hi all,

I'm relatively new to object graphics. I've been playing with Michael
Galloy's mg_show_axes.pro routine and I wanted to extend his ability
to reorient the labels to be readable when the user has rotated the
axes. I wanted to extend that to the text labels on the axes
themselves.

Mike uses the textbaseline property of the axis object to do this.
xaxis->setProperty, textbaseline=[(newTransform[2, 2] gt 0 ? 1 : -1),
0, 0]
yaxis->setProperty, textbaseline=[0, (newTransform[2, 2] gt 0 ? 1 :
-1), 0]
zaxis->setProperty, textbaseline=[0, 0, (newTransform[1, 2] gt 0 ?
-1 : 1)]

where newTransform is the output of the trackball widget. Considering
the text object is inherited by the axis object, I thought that this
property would apply to the text object as well. Unfortunately, that
is not the case. Therefore, in the same location as Mike applies the
above transformation, I explicitly change the baseline property of the
text object via:

xaxis->getProperty, title=xText
yaxis->getProperty, title=yText
zaxis->getProperty, title=zText
xText->setProperty, baseline=[(newTransform[2, 2] gt 0 ? 1 : -1), 0,
0]
yText->setProperty, baseline=[0, (newTransform[2, 2] gt 0 ? 1 : -1),
0]
zText->setProperty, baseline=[0, 0, (newTransform[1, 2] gt 0 ? -1 :
1)]
xaxis->setProperty, title=xText
yaxis->setProperty, title=yText
zaxis->setProperty, title=zText

This doesn't work either. Does anyone (cough, Dr. Galloy, cough) have
any suggestions? Thanks.

-Brian
[Message index]
 
Read Message
Read Message
Previous Topic: Creating procedure with arbitrary number of input parameters
Next Topic: WIDGET_BASE: Unable to connect to X Windows display: :0.0

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:33:32 PDT 2025

Total time taken to generate the page: 1.60182 seconds