GraphicsViewclass

object→Widget→GraphicsView
Namespace
Editor
Assembly
Sandbox.Tools
Declaration
public class Editor.GraphicsView : Editor.Widget

Constructors1

Showing 1 constructors

Methods15

Showing 15 methods

public bool Capture(string path)PUBLIC

ParameterTypeDescription
pathstring—
Returns:bool—

public void CenterOn(Vector2 center)PUBLIC

ParameterTypeDescription
centerVector2—
Returns:void—

public void DeleteAllItems()PUBLIC

Returns:void—

public void FitInView(Sandbox.Rect rect)PUBLIC

ParameterTypeDescription
rectRect—
Returns:void—

public void Translate(Vector2 delta)PUBLIC

ParameterTypeDescription
deltaVector2—
Returns:void—

public void Zoom(float adjust, Vector2 viewpos)PUBLIC

ParameterTypeDescription
adjustfloat—
viewposVector2—
Returns:void—

Properties17

Showing 17 properties

public bool Editor.GraphicsView.Antialiasing { get; set; }PUBLICGETSET

Returns:bool—

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

Returns:bool—

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

Where in the scene is the view currently centered.

Returns:Vector2—

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

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

Returns:DragTypes—

public float Editor.GraphicsView.MaxZoom { get; set; }PUBLICGETSET

Returns:float—

public float Editor.GraphicsView.MinZoom { get; set; }PUBLICGETSET

Returns:float—

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

Returns:Action—

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

All items inside this rect will be selected

Returns:Rect—

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

Returns:bool—

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