Printing vtkScalarActor

Hugues Wisniewski h_wski at yahoo.com
Mon Jul 26 14:53:41 EDT 1999


Hello,

In fact I do exactly the same thing described in the book "VTK User's Guide", on page 137, and it
works fine, the example is scalarBar.tcl.
I don't know if SetPosition(x,y) works correctly, but instead of calling this method, I use :

float fX=0.1, fY=0.01, fWidth=0.8, fHeight=0.17;

pScalarBarActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
pScalarBarActor->GetPositionCoordinate()->SetValue(fX, fY);
pScalarBarActor->SetOrientationToHorizontal();
pScalarBarActor->SetWidth(fWidth);
pScalarBarActor->SetHeight(fHeight);

where fY, fY, fWidth, and fHeight are between 0. and 1.

Hugues

> I have a view that contains a vtkScalarActor among other things.  The
> vtkScalarActor's position is set to something other than (0,0) using
> SetPosition(x,y);  Everthing is fine, until I try to print the view.  The
> vtkScalarActors looks fine, but it is repositioned to (0,0).  Has anyone
> run into this problem before?  What is the fix? BTW, I am using Vtk 2.4
> under VC++ 6.0 on NT 4.0.
> 
> THanks,
> 
> Ben
> 
> John
> Ben L. Held
> Simulation Technology & Applied Research, Inc.
> 11520 N. Port Washington Rd.
> Suite 101 B
> Mequon, WI  53092
> Phone: (414) 240-0293
> FAX: (414) 240-0294
> e-mail: ben.held at staarinc.com
> 
> 
> 
> -----------------------------------------------------------------------------
> This is the private VTK discussion list.  Please keep messages on-topic.
> Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at gsao.med.ge.com>.  For help, send message body containing
> "info vtkusers" to the same address.     Live long and prosper.
> -----------------------------------------------------------------------------
> 
> 

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list