Section: Visualization Toolkit Filtering Classes
To create an instance of class vtkViewport, simply invoke its constructor as follows
obj = vtkViewport
obj
is an instance of the vtkViewport class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkViewport = obj.NewInstance ()
vtkViewport = obj.SafeDownCast (vtkObject o)
obj.AddViewProp (vtkProp )
- Add a prop to the list of props. Prop is the superclass of all
actors, volumes, 2D actors, composite props etc.
vtkPropCollection = obj.GetViewProps ()
- Return any props in this viewport.
int = obj.HasViewProp (vtkProp )
- Query if a prop is in the list of props.
obj.RemoveViewProp (vtkProp )
- Remove an actor from the list of actors.
obj.RemoveAllViewProps (void )
- Remove all actors from the list of actors.
obj.AddActor2D (vtkProp p)
- Add/Remove different types of props to the renderer.
These methods are all synonyms to AddViewProp and RemoveViewProp.
They are here for convenience and backwards compatibility.
obj.RemoveActor2D (vtkProp p)
- Add/Remove different types of props to the renderer.
These methods are all synonyms to AddViewProp and RemoveViewProp.
They are here for convenience and backwards compatibility.
vtkActor2DCollection = obj.GetActors2D ()
- Add/Remove different types of props to the renderer.
These methods are all synonyms to AddViewProp and RemoveViewProp.
They are here for convenience and backwards compatibility.
obj.SetBackground (double , double , double )
- Set/Get the background color of the rendering screen using an rgb color
specification.
obj.SetBackground (double a[3])
- Set/Get the background color of the rendering screen using an rgb color
specification.
double = obj. GetBackground ()
- Set/Get the background color of the rendering screen using an rgb color
specification.
obj.SetBackground2 (double , double , double )
- Set/Get the second background color of the rendering screen
for gradient backgrounds using an rgb color specification.
obj.SetBackground2 (double a[3])
- Set/Get the second background color of the rendering screen
for gradient backgrounds using an rgb color specification.
double = obj. GetBackground2 ()
- Set/Get the second background color of the rendering screen
for gradient backgrounds using an rgb color specification.
obj.SetGradientBackground (bool )
- Set/Get whether this viewport should have a gradient background
using the Background (top) and Background2 (bottom) colors.
Default is off.
bool = obj.GetGradientBackground ()
- Set/Get whether this viewport should have a gradient background
using the Background (top) and Background2 (bottom) colors.
Default is off.
obj.GradientBackgroundOn ()
- Set/Get whether this viewport should have a gradient background
using the Background (top) and Background2 (bottom) colors.
Default is off.
obj.GradientBackgroundOff ()
- Set/Get whether this viewport should have a gradient background
using the Background (top) and Background2 (bottom) colors.
Default is off.
obj.SetAspect (double , double )
- Set the aspect ratio of the rendered image. This is computed
automatically and should not be set by the user.
obj.SetAspect (double a[2])
- Set the aspect ratio of the rendered image. This is computed
automatically and should not be set by the user.
double = obj. GetAspect ()
- Set the aspect ratio of the rendered image. This is computed
automatically and should not be set by the user.
obj.ComputeAspect ()
- Set the aspect ratio of the rendered image. This is computed
automatically and should not be set by the user.
obj.SetPixelAspect (double , double )
- Set the aspect ratio of a pixel in the rendered image.
This factor permits the image to rendered anisotropically
(i.e., stretched in one direction or the other).
obj.SetPixelAspect (double a[2])
- Set the aspect ratio of a pixel in the rendered image.
This factor permits the image to rendered anisotropically
(i.e., stretched in one direction or the other).
double = obj. GetPixelAspect ()
- Set the aspect ratio of a pixel in the rendered image.
This factor permits the image to rendered anisotropically
(i.e., stretched in one direction or the other).
obj.SetViewport (double , double , double , double )
- Specify the viewport for the Viewport to draw in the rendering window.
Coordinates are expressed as (xmin,ymin,xmax,ymax), where each
coordinate is 0 <= coordinate <= 1.0.
obj.SetViewport (double a[4])
- Specify the viewport for the Viewport to draw in the rendering window.
Coordinates are expressed as (xmin,ymin,xmax,ymax), where each
coordinate is 0 <= coordinate <= 1.0.
double = obj. GetViewport ()
- Specify the viewport for the Viewport to draw in the rendering window.
Coordinates are expressed as (xmin,ymin,xmax,ymax), where each
coordinate is 0 <= coordinate <= 1.0.
obj.SetDisplayPoint (double , double , double )
- Set/get a point location in display (or screen) coordinates.
The lower left corner of the window is the origin and y increases
as you go up the screen.
obj.SetDisplayPoint (double a[3])
- Set/get a point location in display (or screen) coordinates.
The lower left corner of the window is the origin and y increases
as you go up the screen.
double = obj. GetDisplayPoint ()
- Set/get a point location in display (or screen) coordinates.
The lower left corner of the window is the origin and y increases
as you go up the screen.
obj.SetViewPoint (double , double , double )
- Specify a point location in view coordinates. The origin is in the
middle of the viewport and it extends from -1 to 1 in all three
dimensions.
obj.SetViewPoint (double a[3])
- Specify a point location in view coordinates. The origin is in the
middle of the viewport and it extends from -1 to 1 in all three
dimensions.
double = obj. GetViewPoint ()
- Specify a point location in view coordinates. The origin is in the
middle of the viewport and it extends from -1 to 1 in all three
dimensions.
obj.SetWorldPoint (double , double , double , double )
- Specify a point location in world coordinates. This method takes
homogeneous coordinates.
obj.SetWorldPoint (double a[4])
- Specify a point location in world coordinates. This method takes
homogeneous coordinates.
double = obj. GetWorldPoint ()
- Specify a point location in world coordinates. This method takes
homogeneous coordinates.
double = obj.GetCenter ()
- Return the center of this viewport in display coordinates.
int = obj.IsInViewport (int x, int y)
- Is a given display point in this Viewport's viewport.
vtkWindow = obj.GetVTKWindow ()
- Return the vtkWindow that owns this vtkViewport.
obj.DisplayToView ()
- Convert display coordinates to view coordinates.
obj.ViewToDisplay ()
- Convert view coordinates to display coordinates.
obj.WorldToView ()
- Convert world point coordinates to view coordinates.
obj.ViewToWorld ()
- Convert view point coordinates to world coordinates.
obj.DisplayToWorld ()
- Convert display (or screen) coordinates to world coordinates.
obj.WorldToDisplay ()
- Convert world point coordinates to display (or screen) coordinates.
int = obj.GetSize ()
- Get the size and origin of the viewport in display coordinates. Note:
if the window has not yet been realized, GetSize() and GetOrigin()
return (0,0).
int = obj.GetOrigin ()
- Get the size and origin of the viewport in display coordinates. Note:
if the window has not yet been realized, GetSize() and GetOrigin()
return (0,0).
obj.GetTiledSize (int width, int height)
- Get the size and origin of the viewport in display coordinates. Note:
if the window has not yet been realized, GetSize() and GetOrigin()
return (0,0).
obj.GetTiledSizeAndOrigin (int width, int height, int lowerLeftX, int lowerLeftY)
- Get the size and origin of the viewport in display coordinates. Note:
if the window has not yet been realized, GetSize() and GetOrigin()
return (0,0).
vtkAssemblyPath = obj.PickProp (double selectionX, double selectionY)
- Return the Prop that has the highest z value at the given x, y position
in the viewport. Basically, the top most prop that renders the pixel at
selectionX, selectionY will be returned. If no Props are there NULL is
returned. This method selects from the Viewports Prop list.
vtkAssemblyPath = obj.PickPropFrom (double selectionX, double selectionY, vtkPropCollection )
- Same as PickProp with two arguments, but selects from the given
collection of Props instead of the Renderers props. Make sure
the Props in the collection are in this renderer.
double = obj.GetPickX () const
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
double = obj.GetPickY () const
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
double = obj.GetPickWidth () const
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
double = obj.GetPickHeight () const
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
double = obj.GetPickX1 () const
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
double = obj.GetPickY1 () const
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
double = obj.GetPickX2 () const
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
double = obj.GetPickY2 () const
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
int = obj.GetIsPicking ()
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
vtkPropCollection = obj.GetPickResultProps ()
- Methods used to return the pick (x,y) in local display coordinates (i.e.,
it's that same as selectionX and selectionY).
double = obj.GetPickedZ ()
- Return the Z value for the last picked Prop.
obj.RemoveProp (vtkProp )
- @deprecated Replaced by vtkViewport::RemoveViewProp() as of VTK 5.0.
obj.AddProp (vtkProp )
- @deprecated Replaced by vtkViewport::AddViewProp() as of VTK 5.0.
vtkPropCollection = obj.GetProps ()
- @deprecated Replaced by vtkViewport::GetViewProps() as of VTK 5.0.
int = obj.HasProp (vtkProp )
- @deprecated Replaced by vtkViewport::HasViewProp() as of VTK 5.0.
obj.RemoveAllProps ()
- @deprecated Replaced by vtkViewport::RemoveAllViewProps() as of VTK 5.0.