RhinoView
ReferencesA RhinoView represents a single "window" display of a document. A view could contain one or many RhinoViewports (many in the case of Layout views with detail viewports). Standard Rhino modeling views have one viewport.
Properties
The ActiveViewport is the same as the MainViewport for standard RhinoViews. In a RhinoPageView, the active viewport may be the RhinoViewport of a child detail object. Most of the time, you will use ActiveViewport unless you explicitly need to work with the main viewport.
Returns viewport ID for the active viewport. Faster than ActiveViewport function when working with page views.
Gets the size and location of the view including its non-client elements, in pixels, relative to the parent control.
Gets the rectangle that represents the client area of the view.
Gets the display pipeline used for this view.
Gets or sets the 'drawing enabled' flag. By default, drawing is enabled.
There are some rare situations where scripts want to disable drawing for a while.
Floating state of RhinoView. if true, then the view will be in a floating frame window. Otherwise the view will be embedded in the main frame.
true if the view is being dynamically changed by mouse moves, arrow keys, trackballs, etc.
A RhinoView contains a "main viewport" that fills the entire view client window. RhinoPageViews may also contain nested child RhinoViewports for implementing detail viewports. The MainViewport will always return this RhinoView's m_vp.
Gets the RealtimeDisplayMode active for this view. null if the view doesn't have a RealtimeDisplayMode set.
Gets the rectangle that represents the client area of the view in screen coordinates.
Methods
Capture View contents to a bitmap.
Returns: The bitmap of the complete view.
Captures the view contents to a bitmap allowing for visibility of grid and axes.
Capture View contents to a bitmap using a display mode description to define how drawing is performed.
Parameters:
| mode (DisplayModeDescription) | The display mode. |
Returns: A new bitmap.
Captures view contents to a bitmap using display attributes to define how drawing is performed.
Parameters:
| attributes (DisplayPipelineAttributes) | The specific display mode attributes. |
Returns: A new bitmap.
Captures a part of the view contents to a bitmap allowing for visibility of grid and axes.
Capture View contents to a bitmap using a display mode description to define how drawing is performed.
Parameters:
| size (Size) | The width and height of the returned bitmap. |
| mode (DisplayModeDescription) | The display mode. |
Returns: A new bitmap.
Capture View contents to a bitmap using display attributes to define how drawing is performed.
Parameters:
| size (Size) | The width and height of the returned bitmap. |
| attributes (DisplayPipelineAttributes) | The specific display mode attributes. |
Returns: A new bitmap.
Capture View contents to a bitmap.
Parameters:
| size (Size) | Size of Bitmap to capture to. |
Returns: The bitmap of the specified part of the view.
Parameters:
| clientPoint (Point) |
Parameters:
| clientPoint (Point2d) |
Remove this View from Rhino. DO NOT attempt to use this instance of this class after calling Close.
Returns: true on success
public bool CreateShadedPreviewImage(string imagePath, Size size, bool ignoreHighlights, bool drawConstructionPlane, bool useGhostedShading)
Creates a bitmap preview image of model.
Parameters:
| imagePath (string) | [in] The name of the bitmap file to create. The extension of the imagePath controls the format of the bitmap file created (BMP, TGA, JPG, PCX, PNG, TIF). |
| size (Size) | [in] The width and height of the bitmap in pixels. |
| ignoreHighlights (bool) | true if highlighted elements should be drawn normally. |
| drawConstructionPlane (bool) | true if the CPlane should be drawn. |
| useGhostedShading (bool) | true if ghosted shading (partially transparent shading) should be used. |
Returns: true if successful.
public bool CreateWireframePreviewImage(string imagePath, Size size, bool ignoreHighlights, bool drawConstructionPlane)
Creates a bitmap preview image of model.
Parameters:
| imagePath (string) | [in] The name of the bitmap file to create. The extension of the imagePath controls the format of the bitmap file created (BMP, TGA, JPG, PCX, PNG, TIF). |
| size (Size) | [in] The width and height of the bitmap in pixels. |
| ignoreHighlights (bool) | true if highlighted elements should be drawn normally. |
| drawConstructionPlane (bool) | true if the CPlane should be drawn. |
Returns: true if successful.
Get a RhinoView from it's unique runtime serial number
Parameters:
| serialNumber (uint) |
Returns: RhinoView or null if no view exists for a given serial number
Returns whether or not the mouse is captured in this view.
Parameters:
| bIncludeMovement (bool) | If captured, test if the mouse has moved between mouse button down and mouse button up. |
Returns: true if captured, false otherwise.
public void Redraw()
Redraws this view.
Remarks: If you change something in "this" view like the projection, construction plane, background bitmap, etc., then you need to call RhinoView.Redraw() to redraw "this" view./ The other views will not be changed. If you change something in the document (like adding new geometry to the model), then you need to call RhinoDoc.Views.Redraw() to redraw all the views.
Converts a point in screen coordinates to client coordinates for this view.
Parameters:
| screenPoint (Point) | The 2D screen point. |
Returns: A 2D point in client coordinates.
Parameters:
| screenPoint (Point2d) |
Shows a temporary popup message in the lower right corner of the view
Shows a temporary popup message in the lower right corner of the view
Shows a temporary popup message in the lower right corner of the view
Parameters:
| message (string) | The message to be shown |
Returns: The runtime serial number of the view toast