Table of Contents

Class Toolbar

Namespace
PAC.Drawing

Handles selecting tools, brush size, etc.

public class Toolbar : MonoBehaviour
Inheritance
Toolbar

Properties

brushPixels

The pixels, given relative to the position of the mouse, that will be affected by the current brush.

public IntVector2[] brushPixels { get; }

Property Value

IntVector2[]

brushPixelsHeight

public int brushPixelsHeight { get; }

Property Value

int

brushPixelsIsEmpty

public bool brushPixelsIsEmpty { get; }

Property Value

bool

brushPixelsIsSingleCentralPixel

public bool brushPixelsIsSingleCentralPixel { get; }

Property Value

bool

brushPixelsWidth

public int brushPixelsWidth { get; }

Property Value

int

brushShape

public BrushShape brushShape { get; set; }

Property Value

BrushShape

brushSize

public int brushSize { get; }

Property Value

int

brushTexture

public Texture2D brushTexture { get; }

Property Value

Texture2D

gradientMode

public GradientMode gradientMode { get; }

Property Value

GradientMode

lineSmoothingTime

The amount of time you have to draw a new pixel in for an old one to be potentially smoothed.

public float lineSmoothingTime { get; }

Property Value

float

previousTool

public Tool previousTool { get; }

Property Value

Tool

selectedTool

public Tool selectedTool { get; }

Property Value

Tool

selectionMode

public SelectionMode selectionMode { get; }

Property Value

SelectionMode

shapeToolShape

public Shape shapeToolShape { get; }

Property Value

Shape

Methods

DeselectGlobalEyeDropper()

public void DeselectGlobalEyeDropper()

LoadCustomBrush(Texture2D)

Turns the given texture into a brush shape by taking any pixels with non-zero alpha.

public void LoadCustomBrush(Texture2D brushShape)

Parameters

brushShape Texture2D

SelectGlobalEyeDropper()

public void SelectGlobalEyeDropper()

SetBrushSize(int)

public bool SetBrushSize(int brushSize)

Parameters

brushSize int

Returns

bool

SubscribeToOnBrushPixelsChanged(UnityAction)

Event invoked when brush pixels change.

public void SubscribeToOnBrushPixelsChanged(UnityAction call)

Parameters

call UnityAction

SubscribeToOnBrushSizeChanged(UnityAction)

Event invoked when brush size changes.

public void SubscribeToOnBrushSizeChanged(UnityAction call)

Parameters

call UnityAction

SubscribeToOnToolChanged(UnityAction)

Event invoked when selected tool changes.

public void SubscribeToOnToolChanged(UnityAction call)

Parameters

call UnityAction