Skip to content

ShapeParameters Class

Defines the parameters for generating a shape with a border and fill glyphs.

C#
public class ShapeParameters

Inheritance object

ShapeParameters(bool, ColoredGlyphBase?, bool, bool, bool, bool, bool, ColoredGlyphBase?, bool, bool, bool, bool, int[]?, ColoredGlyphBase[]?)

Section titled “ShapeParameters(bool, ColoredGlyphBase?, bool, bool, bool, bool, bool, ColoredGlyphBase?, bool, bool, bool, bool, int[]?, ColoredGlyphBase[]?)”

A set of parameters that defines how a shape should be drawn.

C#
public ShapeParameters(bool hasBorder, ColoredGlyphBase? borderGlyph, bool ignoreBorderForeground, bool ignoreBorderBackground, bool ignoreBorderGlyph, bool ignoreBorderMirror, bool hasFill, ColoredGlyphBase? fillGlyph, bool ignoreFillForeground, bool ignoreFillBackground, bool ignoreFillGlyph, bool ignoreFillMirror, int[]? boxBorderStyle, ColoredGlyphBase[]? boxBorderStyleGlyphs)

hasBorder bool
When true, indicates the shape has a border.

borderGlyph ColoredGlyphBase
When not null, uses a single glyph to draw the border.

ignoreBorderForeground bool
When true, ignores the border foreground color.

ignoreBorderBackground bool
When true, ignores the border background color.

ignoreBorderGlyph bool
When true, ignores the border glyph.

ignoreBorderMirror bool
When true, ignores the border mirror.

hasFill bool
When true, indicates this shape is filled.

fillGlyph ColoredGlyphBase
When not null, this is the appearance of the fill.

ignoreFillForeground bool
When true, ignores the fill foreground color.

ignoreFillBackground bool
When true, ignores the fill background color.

ignoreFillGlyph bool
When true, ignores the fill glyph.

ignoreFillMirror bool
When true, ignores the fill mirror.

boxBorderStyle int[]
When not null, the connected lines used for the border.

boxBorderStyleGlyphs ColoredGlyphBase[]
When not null, the appearances used for each part of the connected line.

When true, to indicate the shape contains a border.

C#
public bool HasBorder { get; set; }

When true, indicates this shape is filled.

C#
public bool HasFill { get; set; }

When true, ignores the fill foreground color.

C#
public bool IgnoreFillForeground { get; set; }

When true, ignores the fill background color.

C#
public bool IgnoreFillBackground { get; set; }

When true, ignores the fill glyph.

C#
public bool IgnoreFillGlyph { get; set; }

When true, ignores the fill mirror.

C#
public bool IgnoreFillMirror { get; set; }

When true, ignores the border foreground color.

C#
public bool IgnoreBorderForeground { get; set; }

When true, ignores the border background color.

C#
public bool IgnoreBorderBackground { get; set; }

When true, ignores the border glyph.

C#
public bool IgnoreBorderGlyph { get; set; }

When true, ignores the border mirror.

C#
public bool IgnoreBorderMirror { get; set; }

The fill appearance.

C#
public ColoredGlyphBase? FillGlyph { get; set; }

The connected lines used for the border.

C#
public int[]? BoxBorderStyle { get; set; }

The appearances used for each part of the connected line.

C#
public ColoredGlyphBase[]? BoxBorderStyleGlyphs { get; set; }

A single glyph used for drawing the border.

C#
public ColoredGlyphBase? BorderGlyph { get; set; }

CreateBorder(ColoredGlyphBase, bool, bool, bool, bool)

Section titled “CreateBorder(ColoredGlyphBase, bool, bool, bool, bool)”

Creates a shape parameters object that describes a border.

C#
public static ShapeParameters CreateBorder(ColoredGlyphBase borderStyle, bool ignoreForeground = false, bool ignoreBackground = false, bool ignoreGlyph = false, bool ignoreMirror = false)

borderStyle ColoredGlyphBase
The appearance of the border.

ignoreForeground bool
When true, ignores the foreground of the borderStyle value.

ignoreBackground bool
When true, ignores the background of the borderStyle value.

ignoreGlyph bool
When true, ignores the glyph of the borderStyle value.

ignoreMirror bool
When true, ignores the mirror of the borderStyle value.

ShapeParameters
The shape parameters.

CreateFilled(ColoredGlyphBase?, ColoredGlyphBase, bool, bool, bool, bool, bool, bool, bool, bool)

Section titled “CreateFilled(ColoredGlyphBase?, ColoredGlyphBase, bool, bool, bool, bool, bool, bool, bool, bool)”

Creates a shape parameters object that describes a filled object with an optional border.

C#
public static ShapeParameters CreateFilled(ColoredGlyphBase? borderStyle, ColoredGlyphBase fillStyle, bool ignoreBorderForeground = false, bool ignoreBorderBackground = false, bool ignoreBorderGlyph = false, bool ignoreBorderMirror = false, bool ignoreFillForeground = false, bool ignoreFillBackground = false, bool ignoreFillGlyph = false, bool ignoreFillMirror = false)

borderStyle ColoredGlyphBase
When not null, creates a border with this appearance.

fillStyle ColoredGlyphBase
The fill appearance.

ignoreBorderForeground bool
When true, ignores the foreground of the borderStyle value.

ignoreBorderBackground bool
When true, ignores the background of the borderStyle value.

ignoreBorderGlyph bool
When true, ignores the glyph of the borderStyle value.

ignoreBorderMirror bool
When true, ignores the mirror of the borderStyle value.

ignoreFillForeground bool
When true, ignores the foreground of the fillStyle value.

ignoreFillBackground bool
When true, ignores the background of the fillStyle value.

ignoreFillGlyph bool
When true, ignores the glyph of the fillStyle value.

ignoreFillMirror bool
When true, ignores the mirror of the fillStyle value.

ShapeParameters
The shape parameters.

CreateStyledBox(int[], ColoredGlyphBase, bool, bool, bool)

Section titled “CreateStyledBox(int[], ColoredGlyphBase, bool, bool, bool)”

Creates a shape parameters object that describes a border using a connected line glyph set.

C#
public static ShapeParameters CreateStyledBox(int[] borderStyle, ColoredGlyphBase borderColors, bool ignoreBorderForeground = false, bool ignoreBorderBackground = false, bool ignoreBorderMirror = false)

borderStyle int[]
The connected line glyphs that make up the border.

borderColors ColoredGlyphBase
The appearance colors of the border.

ignoreBorderForeground bool
When true, ignores the foreground of the borderColors value.

ignoreBorderBackground bool
When true, ignores the background of the borderColors value.

ignoreBorderMirror bool
When true, ignores the mirror of the borderColors value.

ShapeParameters
The shape parameters.

CreateStyledBoxFilled(int[], ColoredGlyphBase, ColoredGlyphBase, bool, bool, bool, bool, bool, bool, bool)

Section titled “CreateStyledBoxFilled(int[], ColoredGlyphBase, ColoredGlyphBase, bool, bool, bool, bool, bool, bool, bool)”

Creates a shape parameters object that describes a filled box using a connected line line glyph set for the border.

C#
public static ShapeParameters CreateStyledBoxFilled(int[] borderStyle, ColoredGlyphBase borderColors, ColoredGlyphBase fillStyle, bool ignoreBorderForeground = false, bool ignoreBorderBackground = false, bool ignoreBorderMirror = false, bool ignoreFillForeground = false, bool ignoreFillBackground = false, bool ignoreFillGlyph = false, bool ignoreFillMirror = false)

borderStyle int[]
The connected line glyphs that make up the border.

borderColors ColoredGlyphBase
The appearance colors of the border.

fillStyle ColoredGlyphBase
The appearance colors of the fill.

ignoreBorderForeground bool
When true, ignores the foreground of the borderColors value.

ignoreBorderBackground bool
When true, ignores the background of the borderColors value.

ignoreBorderMirror bool
When true, ignores the mirror of the borderColors value.

ignoreFillForeground bool
When true, ignores the foreground of the fillStyle value.

ignoreFillBackground bool
When true, ignores the background of the fillStyle value.

ignoreFillGlyph bool
When true, ignores the glyph of the fillStyle value.

ignoreFillMirror bool
When true, ignores the mirror of the fillStyle value.

ShapeParameters
The shape parameters.

CreateStyledBoxExplicit(ColoredGlyphBase[], bool, bool, bool)

Section titled “CreateStyledBoxExplicit(ColoredGlyphBase[], bool, bool, bool)”

Creates a shape parameters object that describes an unfilled box using a connected line line glyph set for the border.

C#
public static ShapeParameters CreateStyledBoxExplicit(ColoredGlyphBase[] borderGlyphs, bool ignoreBorderForeground = false, bool ignoreBorderBackground = false, bool ignoreBorderMirror = true)

borderGlyphs ColoredGlyphBase[]
The appearances used for each part of a connected line, specifically the glyph.

ignoreBorderForeground bool
When true, ignores the foreground of the borderGlyphs value.

ignoreBorderBackground bool
When true, ignores the background of the borderGlyphs value.

ignoreBorderMirror bool
When true, ignores the mirror of the borderGlyphs value.

ShapeParameters
The shape parameters.

CreateStyledBoxExplicitFilled(ColoredGlyphBase[], ColoredGlyphBase, bool, bool, bool, bool, bool, bool, bool, bool)

Section titled “CreateStyledBoxExplicitFilled(ColoredGlyphBase[], ColoredGlyphBase, bool, bool, bool, bool, bool, bool, bool, bool)”

Creates a shape parameters object that describes a filled box using a connected line line glyph set for the border.

C#
public static ShapeParameters CreateStyledBoxExplicitFilled(ColoredGlyphBase[] borderGlyphs, ColoredGlyphBase fillStyle, bool ignoreBorderForeground = false, bool ignoreBorderBackground = false, bool ignoreBorderGlyph = false, bool ignoreBorderMirror = true, bool ignoreFillForeground = false, bool ignoreFillBackground = false, bool ignoreFillGlyph = false, bool ignoreFillMirror = false)

borderGlyphs ColoredGlyphBase[]
The appearances used for each part of a connected line, specifically the glyph.

fillStyle ColoredGlyphBase
The appearance colors of the fill.

ignoreBorderForeground bool
When true, ignores the foreground of the borderGlyphs value.

ignoreBorderBackground bool
When true, ignores the background of the borderGlyphs value.

ignoreBorderGlyph bool
When true, ignores the glyph of the borderGlyphs value.

ignoreBorderMirror bool
When true, ignores the mirror of the borderGlyphs value.

ignoreFillForeground bool
When true, ignores the foreground of the fillStyle value.

ignoreFillBackground bool
When true, ignores the background of the fillStyle value.

ignoreFillGlyph bool
When true, ignores the glyph of the fillStyle value.

ignoreFillMirror bool
When true, ignores the mirror of the fillStyle value.

ShapeParameters
The shape parameters.

Creates a box using the ConnectedLineThin connected line style.

C#
public static ShapeParameters CreateStyledBoxThin(Color foreground)

foreground SadRogue.Primitives.Color
The foreground color of the box.

ShapeParameters
The shape parameters.

Creates a box using the ConnectedLineThick connected line style.

C#
public static ShapeParameters CreateStyledBoxThick(Color foreground)

foreground SadRogue.Primitives.Color
The foreground color of the box.

ShapeParameters
The shape parameters.