RhinoCommon API
ViewportInfoSetScreenPort Method (Int32, Int32, Int32, Int32, Int32, Int32) |
Location of viewport in pixels.
These are provided so you can set the port you are using
and get the appropriate transformations to and from
screen space.
// For a Windows window
/ int width = width of window client area in pixels;
/ int height = height of window client area in pixels;
/ port_left = 0;
/ port_right = width;
/ port_top = 0;
/ port_bottom = height;
/ port_near = 0;
/ port_far = 1;
/ SetScreenPort( port_left, port_right,
/ port_bottom, port_top,
/ port_near, port_far );
Namespace: Rhino.DocObjects
Assembly: RhinoCommon (in RhinoCommon.dll)
Since: 5.0

public bool SetScreenPort( int left, int right, int bottom, int top, int near, int far )
Public Function SetScreenPort ( left As Integer, right As Integer, bottom As Integer, top As Integer, near As Integer, far As Integer ) As Boolean
Parameters
- left
- Type: SystemInt32
A left value. - right
- Type: SystemInt32
A left value. (port_left != port_right) - bottom
- Type: SystemInt32
A bottom value. - top
- Type: SystemInt32
A top value. (port_top != port_bottom) - near
- Type: SystemInt32
A near value. - far
- Type: SystemInt32
A far value.
Return Value
Type: Booleantrue if input is valid.
