Table of Contents

Class Tools

Namespace
PAC.Drawing

Defines how different tools act. I may rework this to be more like the BlendMode class where each Tool instance defines how it acts. Then to use a tool you would just do tool.Use(pixel) or similar.

public static class Tools
Inheritance
Tools
Inherited Members

Methods

PencilLineSmoothing(File, int, int, IntVector2[], IntVector2[], Color)

Smooth the meeting point of the two lines (given as coords) so it is pixel-perfect - i.e. no hard 90-degree corner.

public static bool PencilLineSmoothing(File file, int layer, int frame, IntVector2[] line, IntVector2[] previousLine, Color colourLineMeetingPoint)

Parameters

file File
layer int
frame int
line IntVector2[]
previousLine IntVector2[]
colourLineMeetingPoint Color

Returns

bool

UseBrush(File, int, int, IntVector2, IntVector2[], Color)

public static void UseBrush(File file, int layer, int frame, IntVector2 pixel, IntVector2[] brushBorderMaskPixels, Color colour)

Parameters

file File
layer int
frame int
pixel IntVector2
brushBorderMaskPixels IntVector2[]
colour Color

UseBrush(File, int, int, int, int, IntVector2[], Color)

public static void UseBrush(File file, int layer, int frame, int x, int y, IntVector2[] brushBorderMaskPixels, Color colour)

Parameters

file File
layer int
frame int
x int
y int
brushBorderMaskPixels IntVector2[]
colour Color

UseCircle(File, int, int, IntVector2, IntVector2, Color, bool, bool)

public static void UseCircle(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color colour, bool filled, bool stayWithinImageBounds)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
colour Color
filled bool
stayWithinImageBounds bool

UseEllipse(File, int, int, IntVector2, IntVector2, Color, bool)

public static void UseEllipse(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color colour, bool filled)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
colour Color
filled bool

UseEyeDropper(File, int, int, IntVector2)

public static Color UseEyeDropper(File file, int layer, int frame, IntVector2 pixel)

Parameters

file File
layer int
frame int
pixel IntVector2

Returns

Color

UseEyeDropper(File, int, int, int, int)

public static Color UseEyeDropper(File file, int layer, int frame, int x, int y)

Parameters

file File
layer int
frame int
x int
y int

Returns

Color

UseFill(File, int, int, IntVector2, Color, int)

public static void UseFill(File file, int layer, int frame, IntVector2 pixel, Color colour, int maxNumOfIterations = 1000000)

Parameters

file File
layer int
frame int
pixel IntVector2
colour Color
maxNumOfIterations int

UseFill(File, int, int, int, int, Color, int)

public static void UseFill(File file, int layer, int frame, int x, int y, Color colour, int maxNumOfIterations = 1000000)

Parameters

file File
layer int
frame int
x int
y int
colour Color
maxNumOfIterations int

UseGradient(File, int, int, IntVector2, IntVector2, Color, Color, GradientMode)

public static void UseGradient(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color startColour, Color endColour, GradientMode gradientMode)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
startColour Color
endColour Color
gradientMode GradientMode

UseGradient(File, int, int, IntVector2, IntVector2, Color, Color, GradientMode, IntVector2[])

public static void UseGradient(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color startColour, Color endColour, GradientMode gradientMode, IntVector2[] mask)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
startColour Color
endColour Color
gradientMode GradientMode
mask IntVector2[]

UseGradient(File, int, int, IntVector2, IntVector2, Color, Color, GradientMode, Texture2D)

public static void UseGradient(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color startColour, Color endColour, GradientMode gradientMode, Texture2D mask)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
startColour Color
endColour Color
gradientMode GradientMode
mask Texture2D

UseGradientLinear(File, int, int, IntVector2, IntVector2, Color, Color)

public static void UseGradientLinear(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color startColour, Color endColour)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
startColour Color
endColour Color

UseGradientLinear(File, int, int, IntVector2, IntVector2, Color, Color, IntVector2[])

public static void UseGradientLinear(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color startColour, Color endColour, IntVector2[] mask)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
startColour Color
endColour Color
mask IntVector2[]

UseGradientLinear(File, int, int, IntVector2, IntVector2, Color, Color, Texture2D)

public static void UseGradientLinear(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color startColour, Color endColour, Texture2D mask)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
startColour Color
endColour Color
mask Texture2D

UseGradientRadial(File, int, int, IntVector2, IntVector2, Color, Color)

public static void UseGradientRadial(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color startColour, Color endColour)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
startColour Color
endColour Color

UseGradientRadial(File, int, int, IntVector2, IntVector2, Color, Color, IntVector2[])

public static void UseGradientRadial(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color startColour, Color endColour, IntVector2[] mask)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
startColour Color
endColour Color
mask IntVector2[]

UseGradientRadial(File, int, int, IntVector2, IntVector2, Color, Color, Texture2D)

public static void UseGradientRadial(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color startColour, Color endColour, Texture2D mask)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
startColour Color
endColour Color
mask Texture2D

UseIsoBox(File, int, int, IntVector2, IntVector2, IntVector2, Color, bool)

public static void UseIsoBox(File file, int layer, int frame, IntVector2 baseStart, IntVector2 baseEnd, IntVector2 heightEnd, Color colour, bool filled)

Parameters

file File
layer int
frame int
baseStart IntVector2
baseEnd IntVector2
heightEnd IntVector2
colour Color
filled bool

UseIsoRectangle(File, int, int, IntVector2, IntVector2, Color, bool)

public static void UseIsoRectangle(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color colour, bool filled)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
colour Color
filled bool

UseLine(File, int, int, IntVector2, IntVector2, Color)

public static void UseLine(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color colour)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
colour Color

UsePencil(File, int, int, IntVector2, Color)

public static void UsePencil(File file, int layer, int frame, IntVector2 pixel, Color colour)

Parameters

file File
layer int
frame int
pixel IntVector2
colour Color

UsePencil(File, int, int, int, int, Color)

public static void UsePencil(File file, int layer, int frame, int x, int y, Color colour)

Parameters

file File
layer int
frame int
x int
y int
colour Color

UseRectangle(File, int, int, IntVector2, IntVector2, Color, bool)

public static void UseRectangle(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color colour, bool filled)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
colour Color
filled bool

UseRightTriangle(File, int, int, IntVector2, IntVector2, Color, bool, bool)

public static void UseRightTriangle(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color colour, bool rightAngleOnBottom, bool filled)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
colour Color
rightAngleOnBottom bool
filled bool

UseRubber(File, int, int, IntVector2)

public static void UseRubber(File file, int layer, int frame, IntVector2 pixel)

Parameters

file File
layer int
frame int
pixel IntVector2

UseRubber(File, int, int, IntVector2, IntVector2[])

public static void UseRubber(File file, int layer, int frame, IntVector2 pixel, IntVector2[] brushBorderMaskPixels)

Parameters

file File
layer int
frame int
pixel IntVector2
brushBorderMaskPixels IntVector2[]

UseRubber(File, int, int, int, int)

public static void UseRubber(File file, int layer, int frame, int x, int y)

Parameters

file File
layer int
frame int
x int
y int

UseRubber(File, int, int, int, int, IntVector2[])

public static void UseRubber(File file, int layer, int frame, int x, int y, IntVector2[] brushBorderMaskPixels)

Parameters

file File
layer int
frame int
x int
y int
brushBorderMaskPixels IntVector2[]

UseSquare(File, int, int, IntVector2, IntVector2, Color, bool, bool)

public static void UseSquare(File file, int layer, int frame, IntVector2 start, IntVector2 end, Color colour, bool filled, bool stayWithinImageBounds)

Parameters

file File
layer int
frame int
start IntVector2
end IntVector2
colour Color
filled bool
stayWithinImageBounds bool