s&box docs

public class Editor.GraphicsView : Editor.Widget

Constructors

Showing 1 constructors

Methods

Showing 15 methods

public bool Capture(string path)

public void CenterOn(Vector2 center)

public void DeleteAllItems()

public void FitInView(Sandbox.Rect rect)

public void Translate(Vector2 delta)

public void Zoom(float adjust, Vector2 viewpos)

Properties

Showing 17 properties

public bool Editor.GraphicsView.BilinearFiltering { get; set; }

public Vector2 Editor.GraphicsView.Center { get; set; }

Where in the scene is the view currently centered.

public Editor.GraphicsView.DragTypes Editor.GraphicsView.DragType { get; set; }

What happens when the user drags the mouse. You generally want to toggle this in OnMouseDown to switch what happens with different mouse buttons.

public System.Action Editor.GraphicsView.OnSelectionChanged { get; set; }

public Sandbox.Rect Editor.GraphicsView.SelectionRect { get; set; }

All items inside this rect will be selected

public bool Editor.GraphicsView.TextAntialiasing { get; set; }

Metadata

FieldValue
NamespaceEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.GraphicsView

On this page

Constructorspublic GraphicsView(Editor.Widget parent = null)Methodspublic System.Void Add(Editor.GraphicsItem t)public Editor.GraphicsWidget Add(Editor.Widget t)public System.Boolean Capture(System.String path)public System.Void CenterOn(Vector2 center)public System.Void DeleteAllItems()public System.Void FitInView(Sandbox.Rect rect)public Sandbox.Rect FromScene(Sandbox.Rect pos)public Vector2 FromScene(Vector2 pos)public Editor.GraphicsItem GetItemAt(Vector2 scenePosition)public System.Void SetBackgroundImage(Editor.Pixmap image)public System.Void SetBackgroundImage(System.String image)public Sandbox.Rect ToScene(Sandbox.Rect pos)public Vector2 ToScene(Vector2 pos)public System.Void Translate(Vector2 delta)public System.Void Zoom(System.Single adjust, Vector2 viewpos)Propertiespublic System.Boolean Editor.GraphicsView.Antialiasing { get; set; }public System.Boolean Editor.GraphicsView.BilinearFiltering { get; set; }public Vector2 Editor.GraphicsView.Center { get; set; }public Editor.GraphicsView.DragTypes Editor.GraphicsView.DragType { get; set; }public Editor.ScrollbarMode Editor.GraphicsView.HorizontalScrollbar { get; set; }public System.Collections.Generic.IEnumerable`1<Editor.GraphicsItem> Editor.GraphicsView.Items { get; set; }public System.Single Editor.GraphicsView.MaxZoom { get; set; }public System.Single Editor.GraphicsView.MinZoom { get; set; }public System.Action Editor.GraphicsView.OnSelectionChanged { get; set; }public System.Single Editor.GraphicsView.Rotation { get; set; }public Vector2 Editor.GraphicsView.Scale { get; set; }public Sandbox.Rect Editor.GraphicsView.SceneRect { get; set; }public System.Collections.Generic.IEnumerable`1<Editor.GraphicsItem> Editor.GraphicsView.SelectedItems { get; set; }public Sandbox.Rect Editor.GraphicsView.SelectionRect { get; set; }public System.Boolean Editor.GraphicsView.TextAntialiasing { get; set; }public Editor.GraphicsView.ViewportAnchorType Editor.GraphicsView.TransformAnchor { get; set; }public Editor.ScrollbarMode Editor.GraphicsView.VerticalScrollbar { get; set; }Metadata