[vtkusers] Turning Auto Rescaling Off on vtkActor2D

Gerrick Bivins gbivins at objectreservoir.com
Wed Jul 30 10:05:02 EDT 2008


Hi Sarah,
How is your vtkScalarBarActor set up? At what point does it become
unreadable? Can you provide a screen cap of the problem. I'm using
vtkScalarBarActor w/o issues when resizing my window. 

Here is my setup:
        scalarbar = new vtkScalarBarActor();
        scalarbar.SetOrientationToHorizontal();
       
scalarbar.GetPositionCoordinate().SetCoordinateSystemToNormalizedViewport();
        scalarbar.GetPositionCoordinate().SetValue(.2,.05);
        
        scalarbar.SetWidth( 0.7 );
        scalarbar.SetHeight( 0.1 );
        scalarbar.SetPosition( 0.1, 0.01 );
        scalarbar.SetLabelFormat("%-#6.3f");
        scalarbar.GetTitleTextProperty().SetFontFamilyToArial();
        scalarbar.GetTitleTextProperty().SetFontSize( 12 );
        scalarbar.GetLabelTextProperty().SetFontFamilyToArial();
        scalarbar.GetLabelTextProperty().SetFontSize(10);
        scalarbar.GetLabelTextProperty().SetJustificationToCentered();

This keeps it placed at the bottom of my window with all of it's properties
(width,height,position) relative to the window.
Gerrick


Sarah Macumber wrote:
> 
> Is there any way to turn off the auto rescaling of the vtkActor2D which
> happens when the window changes sizes? Specifically I am trying to keep a
> vtkScalarBarActor from becoming illegible.  It would be nice if I could
> set a minimum size & font but a fixed size would do as well.  I looked at
> the code for a vtkActor2D and I am not sure how one would turn the auto
> scaling off.
>  
> Thanks Sarah
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 

-- 
View this message in context: http://www.nabble.com/Turning-Auto-Rescaling-Off-on-vtkActor2D-tp18715272p18734015.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list