Api Editor GraphicsView
class

GraphicsView

public class GraphicsView : Widget

Constructors

GraphicsView(Widget parent)

Properties

Name Type Description
SceneRect Rect
SelectionRect Rect All items inside this rect will be selected
Center Vector2 Where in the scene is the view currently centered.
Scale Vector2
Rotation Single
SelectedItems IEnumerable<GraphicsItem>
MinZoom Single
MaxZoom Single
Items IEnumerable<GraphicsItem>
HorizontalScrollbar ScrollbarMode
VerticalScrollbar ScrollbarMode
TransformAnchor ViewportAnchorType
OnSelectionChanged Action
DragType DragTypes What happens when the user drags the mouse. You generally want to toggle this in OnMouseDown to switch what happens with different mouse buttons.
Antialiasing Boolean
TextAntialiasing Boolean
BilinearFiltering Boolean

Methods

Boolean Capture(String path)
Void Zoom(Single adjust, Vector2 viewpos)
Void Translate(Vector2 delta)
Vector2 ToScene(Vector2 pos)
Rect ToScene(Rect pos)
Vector2 FromScene(Vector2 pos)
Rect FromScene(Rect pos)
Void DeleteAllItems()
Void CenterOn(Vector2 center)
Void FitInView(Rect rect)
Void SetBackgroundImage(String image)
Void SetBackgroundImage(Pixmap image)
GraphicsItem GetItemAt(Vector2 scenePosition)
Void Add(GraphicsItem t)
Assembly: Sandbox.Tools Namespace: Editor Full Name: Editor.GraphicsView