Click or drag to resize

GH_NamedView Class

Named views are used both to store named views but also to allow smooth programmatic canvas navigation.
Inheritance Hierarchy
SystemObject
  Grasshopper.GUI.CanvasGH_NamedView

Namespace:  Grasshopper.GUI.Canvas
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public class GH_NamedView : GH_ISerializable

The GH_NamedView type exposes the following members.

Constructors
  NameDescription
Public methodGH_NamedView
Create a default named view.
Public methodGH_NamedView(Rectangle, RectangleF)
Create a new view useful for box-fit transitions.
Public methodGH_NamedView(GH_Viewport, Point, PointF)
Create a new view useful for point match transitions.
Public methodGH_NamedView(GH_Viewport, Rectangle, PointF)
Create a new view useful for point inclusion transitions.
Public methodGH_NamedView(String, PointF, Single, GH_NamedViewType)
Create a new named view.
Top
Properties
  NameDescription
Public propertyName
Gets or sets the name of the view.
Public propertyPoint
Gets or sets the anchor point of the named view.
Public propertyType
Gets or sets a value indicating whether the anchor point represents the target or the center.
Public propertyZoom
Gets or sets the zoom factor of the named view.
Top
Methods
  NameDescription
Public methodLoadFromViewport
Create a named view from a viewport.
Public methodRead
Public methodSetToViewport(GH_Canvas)
Set the named view to the canvas viewport and redraw the canvas.
Public methodSetToViewport(GH_Viewport)
Set the named view to a viewport.
Public methodSetToViewport(GH_Canvas, Int32)
Animates a view transition.
Public methodWrite
Top
Events
  NameDescription
Public eventSmoothFrame
This event is raised during smooth animations.
Top
See Also