[vtkusers] Help: How to keep the axis labels in a vtkXYPlotActor from being scaled
Nasos Iliopoulos
nasos_i at hotmail.com
Sun Jun 21 10:37:26 EDT 2009
Maybe define the callback on one or more of the vtkTextProperties? i.e.
vtkTextProperty *tp = xyplotactor->GetAxisTitleTextProperty();
tp->addObserver(....
Find a list of them here:
http://www.vtk.org/doc/nightly/html/classvtkXYPlotActor.html#8325ce9bc384ba655e595e3dd9a5d6bc
> Date: Sat, 20 Jun 2009 23:16:32 +0200
> From: nundee at gmail.com
> To: nasos_i at hotmail.com
> CC: vtkusers at vtk.org
> Subject: Re: [vtkusers] Help: How to keep the axis labels in a vtkXYPlotActor from being scaled
>
> Hi Nasos,
> thank you very much for the hint.
> I actually tried with "xyplot->AddObserver(vtkCommand::ModifiedEvent,
> ...)"
> but my callback wont get called on resize. Any clue ?
>
> BR
> Nandi
>
> Nasos Iliopoulos wrote:
> > I think there is no vtk-api way to do that. A fast work-around though
> > is by creating a callback when the xyplotactor is modified, then
> > manually set the fontsize of the title, axis labels etc to appropriate
> > scale.
> >
> > Search for "SetRelativeFontSize", in the implementation of
> > vtkxyplotactor
> > (http://public.kitware.com/cgi-bin/cvsweb.cgi/VTK/Hybrid/vtkXYPlotActor.cxx?rev=1.69;content-type=text%2Fplain)
> > to see how the vtkxyplotactor sizes the fonts and do the inverse to
> > get non-resized fonts.
> >
> > I may try this in my code in the near future and will send you a
> > response if I get appropriate results.
> >
> > Best
> > Nasos
> >
> > > Date: Thu, 18 Jun 2009 19:24:39 +0200
> > > From: nundee at gmail.com
> > > To: vtkusers at vtk.org
> > > Subject: [vtkusers] Help: How to keep the axis labels in a
> > vtkXYPlotActor from being scaled
> > >
> > > Hi,
> > >
> > > if you resize the render window containing a XYPlotActor the axis labels
> > > will get also resized. Is there any way to change this behaviour,
> > > leaving the labels unscaled ?
> > >
> > > Thanks in advance
> > > Nandi
> > > _______________________________________________
> > > Powered by www.kitware.com
> > >
> > > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> > >
> > > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > >
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> > ------------------------------------------------------------------------
> > Insert movie times and more without leaving Hotmail®. See how.
> > <http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009>
>
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090621/64a3560a/attachment.htm>
More information about the vtkusers
mailing list