Table of Contents

Class Shapes

Namespace
PAC.Drawing

A class to define how different shapes are drawn.

public static class Shapes
Inheritance
Shapes
Inherited Members

Methods

Circle(int, int, IntVector2, IntVector2, Color, bool, bool)

public static Texture2D Circle(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled, bool stayWithinImageBounds)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
colour Color
filled bool
stayWithinImageBounds bool

Returns

Texture2D

Diamond(int, int, IntVector2, IntVector2, Color, bool)

public static Texture2D Diamond(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
colour Color
filled bool

Returns

Texture2D

Ellipse(int, int, IntVector2, IntVector2, Color, bool)

public static Texture2D Ellipse(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
colour Color
filled bool

Returns

Texture2D

Gradient(int, int, IntVector2, IntVector2, Color, Color, GradientMode)

public static Texture2D Gradient(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color startColour, Color endColour, GradientMode gradientMode)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
startColour Color
endColour Color
gradientMode GradientMode

Returns

Texture2D

GradientLinear(int, int, IntVector2, IntVector2, Color, Color)

public static Texture2D GradientLinear(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color startColour, Color endColour)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
startColour Color
endColour Color

Returns

Texture2D

GradientRadial(int, int, IntVector2, IntVector2, Color, Color)

public static Texture2D GradientRadial(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color startColour, Color endColour)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
startColour Color
endColour Color

Returns

Texture2D

IsoBox(int, int, IntVector2, IntVector2, IntVector2, Color, bool)

public static Texture2D IsoBox(int texWidth, int texHeight, IntVector2 baseStart, IntVector2 baseEnd, IntVector2 heightEnd, Color colour, bool filled)

Parameters

texWidth int
texHeight int
baseStart IntVector2
baseEnd IntVector2
heightEnd IntVector2
colour Color
filled bool

Returns

Texture2D

IsoRectangle(int, int, IntVector2, IntVector2, Color, bool)

public static Texture2D IsoRectangle(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
colour Color
filled bool

Returns

Texture2D

Line(int, int, IntVector2, IntVector2, Color)

public static Texture2D Line(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
colour Color

Returns

Texture2D

LineCoords(IntVector2, IntVector2)

Gets the coords of a pixel-perfect line between two points, ordered from start to end.

public static IntVector2[] LineCoords(IntVector2 start, IntVector2 end)

Parameters

start IntVector2
end IntVector2

Returns

IntVector2[]

Rectangle(int, int, IntVector2, IntVector2, Color, bool)

public static Texture2D Rectangle(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
colour Color
filled bool

Returns

Texture2D

RightTriangle(int, int, IntVector2, IntVector2, Color, bool, bool)

public static Texture2D RightTriangle(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool rightAngleOnBottom, bool filled)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
colour Color
rightAngleOnBottom bool
filled bool

Returns

Texture2D

SnapEndCoordToSquare(IntVector2, IntVector2)

Snaps the end coord so that the rect it forms with the start coord is a square.

public static IntVector2 SnapEndCoordToSquare(IntVector2 start, IntVector2 end)

Parameters

start IntVector2
end IntVector2

Returns

IntVector2

SnapEndCoordToSquare(int, int, IntVector2, IntVector2, bool)

Snaps the end coord so that the rect it forms with the start coord is a square.

public static IntVector2 SnapEndCoordToSquare(int texWidth, int texHeight, IntVector2 start, IntVector2 end, bool stayWithinImageBounds)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
stayWithinImageBounds bool

Returns

IntVector2

Square(int, int, IntVector2, IntVector2, Color, bool, bool)

public static Texture2D Square(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled, bool stayWithinImageBounds)

Parameters

texWidth int
texHeight int
start IntVector2
end IntVector2
colour Color
filled bool
stayWithinImageBounds bool

Returns

Texture2D