Skip to content

Border.BorderParameters Struct

The settings to use when creating a Border.

C#
public struct Border.BorderParameters

BorderParameters(bool, ShapeParameters?, string?, HorizontalAlignment, Color, Color, bool, bool, bool, int, Color, Color)

Section titled “BorderParameters(bool, ShapeParameters?, string?, HorizontalAlignment, Color, Color, bool, bool, bool, int, Color, Color)”

Creates a new instance of this class which contains the settings for drawing a border surface around an existing surface.

C#
public BorderParameters(bool drawBorder, ShapeParameters? borderBox, string? title, HorizontalAlignment titleAlignment, Color titleForeground, Color titleBackground, bool drawShadedArea, bool useDefaultShadedGlyphs, bool useDefaultShadedColors, int shadedGlyph, Color shadedGlyphForeground, Color shadedGlyphBackground)

drawBorder bool
When true, indicates the borderBox should be used to draw a border.

borderBox ShapeParameters
The box drawn around the surface.

title string
The title to display on the border.

titleAlignment HorizontalAlignment
The alignment of the title.

titleForeground SadRogue.Primitives.Color
The foreground color of the title.

titleBackground SadRogue.Primitives.Color
The background color of the title.

drawShadedArea bool
When true, indicates the 3d shaded area of the border should be drawn.

useDefaultShadedGlyphs bool
When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.

useDefaultShadedColors bool
When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.

shadedGlyph int
The glyph to use in the shaded area.

shadedGlyphForeground SadRogue.Primitives.Color
The forground of the shadedGlyph.

shadedGlyphBackground SadRogue.Primitives.Color
The background of the shadedGlyph.

When true, indicates the BorderBox should be used to draw a border.

C#
public bool DrawBorder { readonly get; set; }

The border box creation parameters.

C#
public ShapeParameters? BorderBox { readonly get; set; }

The title to display on the border.

C#
public string? Title { readonly get; set; }

The foreground color of the title.

C#
public Color TitleForeground { readonly get; set; }

The background color of the title.

C#
public Color TitleBackground { readonly get; set; }

The alignment of the Title.

C#
public HorizontalAlignment TitleAlignment { readonly get; set; }

When true, indicates the 3d shaded area of the border should be drawn.

C#
public bool DrawShadedArea { readonly get; set; }

When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.

C#
public bool UseDefaultShadedGlyphs { readonly get; set; }

When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.

C#
public bool UseDefaultShadedColors { readonly get; set; }

The glyph to use in the shaded area.

C#
public int ShadedGlyph { readonly get; set; }

The forground of the ShadedGlyph.

C#
public Color ShadedGlyphForeground { readonly get; set; }

The background of the ShadedGlyph.

C#
public Color ShadedGlyphBackground { readonly get; set; }

Creates an instance of BorderParameters with the thin line as a border, no title and no shadow.

C#
public static Border.BorderParameters GetDefault()

Border.BorderParameters

Sets the Title parameter with the given text.

C#
public Border.BorderParameters AddTitle(string title)

title string
Title text.

Border.BorderParameters
The modified instance of Border.BorderParameters.

AddTitle(string, Color, Color, HorizontalAlignment)

Section titled “AddTitle(string, Color, Color, HorizontalAlignment)”

Sets the Title parameter with the given text and changes title colors.

C#
public Border.BorderParameters AddTitle(string title, Color foregroundColor, Color backgroundColor, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Center)

title string
Title text.

foregroundColor SadRogue.Primitives.Color
Title foreground SadRogue.Primitives.Color.

backgroundColor SadRogue.Primitives.Color
Title background SadRogue.Primitives.Color.

horizontalAlignment HorizontalAlignment
Title text HorizontalAlignment.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Sets the DrawShadedArea to true.

C#
public Border.BorderParameters AddShadow()

Border.BorderParameters
The modified instance of Border.BorderParameters.

Sets the DrawShadedArea to true and modifies shadow glyph.

C#
public Border.BorderParameters AddShadow(int shadedGlyph)

shadedGlyph int
Glyph number to use as a shadow.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Sets the DrawShadedArea to true and modifies default shadow colors.

C#
public Border.BorderParameters AddShadow(Color foregroundColor, Color backgroundColor)

foregroundColor SadRogue.Primitives.Color
ShadedGlyph new foreground SadRogue.Primitives.Color.

backgroundColor SadRogue.Primitives.Color
ShadedGlyph new background SadRogue.Primitives.Color.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Sets the DrawShadedArea to true and modifies default shadow glyph and colors.

C#
public Border.BorderParameters AddShadow(int shadedGlyph, Color foregroundColor, Color backgroundColor)

shadedGlyph int
Glyph number to use as a shadow.

foregroundColor SadRogue.Primitives.Color
ShadedGlyph new foreground SadRogue.Primitives.Color.

backgroundColor SadRogue.Primitives.Color
ShadedGlyph new background SadRogue.Primitives.Color.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Set the BorderBox parameter to the new value.

C#
public Border.BorderParameters ChangeBorderStyle(ShapeParameters borderStyle)

borderStyle ShapeParameters
New ShapeParameters to use for the border style.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Changes the array of glyphs to be used as the border line.

C#
public Border.BorderParameters ChangeBorderGlyph(int[] borderStyle)

borderStyle int[]
Array of glyphs to be used as the border line.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Changes the array of glyphs to be used as the border line and their colors.

C#
public Border.BorderParameters ChangeBorderGlyph(int[] borderStyle, Color foregroundColor, Color backgroundColor)

borderStyle int[]
Array of glyphs to be used as the border line.

foregroundColor SadRogue.Primitives.Color
Border line foreground SadRogue.Primitives.Color.

backgroundColor SadRogue.Primitives.Color
Border line background SadRogue.Primitives.Color.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Fills the array of glyphs to be used as the border line with the given glyph.

C#
public Border.BorderParameters ChangeBorderGlyph(int glyph)

glyph int
The glyph to be used the border line.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Fills the array of glyphs to be used as the border line with the given glyph and changes the border colors.

C#
public Border.BorderParameters ChangeBorderGlyph(int glyph, Color foregroundColor, Color backgroundColor)

glyph int
The glyph to be used the border line.

foregroundColor SadRogue.Primitives.Color
Border line foreground SadRogue.Primitives.Color.

backgroundColor SadRogue.Primitives.Color
Border line background SadRogue.Primitives.Color.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Fills the array of glyphs to be used as the border line with the given ColoredGlyphBase.

C#
public Border.BorderParameters ChangeBorderGlyph(ColoredGlyphBase glyph)

glyph ColoredGlyphBase
The ColoredGlyphBase to be used the border line.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Changes border color parameters.

C#
public Border.BorderParameters ChangeBorderColors(Color foregroundColor, Color backgroundColor)

foregroundColor SadRogue.Primitives.Color
Border line foreground SadRogue.Primitives.Color.

backgroundColor SadRogue.Primitives.Color
Border line background SadRogue.Primitives.Color.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Changes border foreground color.

C#
public Border.BorderParameters ChangeBorderForegroundColor(Color foregroundColor)

foregroundColor SadRogue.Primitives.Color
Border line foreground SadRogue.Primitives.Color.

Border.BorderParameters
The modified instance of Border.BorderParameters.

Changes border background color.

C#
public Border.BorderParameters ChangeBorderBackgroundColor(Color backgroundColor)

backgroundColor SadRogue.Primitives.Color
Border line background SadRogue.Primitives.Color.

Border.BorderParameters
The modified instance of Border.BorderParameters.