Class ShapeParameters
Defines the parameters for generating a shape with a border and fill glyphs.
Inherited Members
Namespace: SadConsole
Assembly: SadConsole.dll
Syntax
public class ShapeParameters
Constructors
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.
Declaration
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)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | hasBorder | When true, indicates the shape has a border. |
| ColoredGlyphBase | borderGlyph | When not null, uses a single glyph to draw the border. |
| bool | ignoreBorderForeground | When true, ignores the border foreground color. |
| bool | ignoreBorderBackground | When true, ignores the border background color. |
| bool | ignoreBorderGlyph | When true, ignores the border glyph. |
| bool | ignoreBorderMirror | When true, ignores the border mirror. |
| bool | hasFill | When true, indicates this shape is filled. |
| ColoredGlyphBase | fillGlyph | When not null, this is the appearance of the fill. |
| bool | ignoreFillForeground | When true, ignores the fill foreground color. |
| bool | ignoreFillBackground | When true, ignores the fill background color. |
| bool | ignoreFillGlyph | When true, ignores the fill glyph. |
| bool | ignoreFillMirror | When true, ignores the fill mirror. |
| int[] | boxBorderStyle | When not null, the connected lines used for the border. |
| ColoredGlyphBase[] | boxBorderStyleGlyphs | When not null, the appearances used for each part of the connected line. |
Properties
BorderGlyph
A single glyph used for drawing the border.
Declaration
public ColoredGlyphBase? BorderGlyph { get; set; }
Property Value
| Type | Description |
|---|---|
| ColoredGlyphBase |
BoxBorderStyle
The connected lines used for the border.
Declaration
public int[]? BoxBorderStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| int[] |
BoxBorderStyleGlyphs
The appearances used for each part of the connected line.
Declaration
public ColoredGlyphBase[]? BoxBorderStyleGlyphs { get; set; }
Property Value
| Type | Description |
|---|---|
| ColoredGlyphBase[] |
FillGlyph
The fill appearance.
Declaration
public ColoredGlyphBase? FillGlyph { get; set; }
Property Value
| Type | Description |
|---|---|
| ColoredGlyphBase |
HasBorder
When true, to indicate the shape contains a border.
Declaration
public bool HasBorder { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
HasFill
When true, indicates this shape is filled.
Declaration
public bool HasFill { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IgnoreBorderBackground
When true, ignores the border background color.
Declaration
public bool IgnoreBorderBackground { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IgnoreBorderForeground
When true, ignores the border foreground color.
Declaration
public bool IgnoreBorderForeground { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IgnoreBorderGlyph
When true, ignores the border glyph.
Declaration
public bool IgnoreBorderGlyph { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IgnoreBorderMirror
When true, ignores the border mirror.
Declaration
public bool IgnoreBorderMirror { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IgnoreFillBackground
When true, ignores the fill background color.
Declaration
public bool IgnoreFillBackground { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IgnoreFillForeground
When true, ignores the fill foreground color.
Declaration
public bool IgnoreFillForeground { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IgnoreFillGlyph
When true, ignores the fill glyph.
Declaration
public bool IgnoreFillGlyph { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IgnoreFillMirror
When true, ignores the fill mirror.
Declaration
public bool IgnoreFillMirror { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
CreateBorder(ColoredGlyphBase, bool, bool, bool, bool)
Creates a shape parameters object that describes a border.
Declaration
public static ShapeParameters CreateBorder(ColoredGlyphBase borderStyle, bool ignoreForeground = false, bool ignoreBackground = false, bool ignoreGlyph = false, bool ignoreMirror = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ColoredGlyphBase | borderStyle | The appearance of the border. |
| bool | ignoreForeground | When true, ignores the foreground of the |
| bool | ignoreBackground | When true, ignores the background of the |
| bool | ignoreGlyph | When true, ignores the glyph of the |
| bool | ignoreMirror | When true, ignores the mirror of the |
Returns
| Type | Description |
|---|---|
| ShapeParameters | The shape parameters. |
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.
Declaration
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)
Parameters
| Type | Name | Description |
|---|---|---|
| ColoredGlyphBase | borderStyle | When not null, creates a border with this appearance. |
| ColoredGlyphBase | fillStyle | The fill appearance. |
| bool | ignoreBorderForeground | When true, ignores the foreground of the |
| bool | ignoreBorderBackground | When true, ignores the background of the |
| bool | ignoreBorderGlyph | When true, ignores the glyph of the |
| bool | ignoreBorderMirror | When true, ignores the mirror of the |
| bool | ignoreFillForeground | When true, ignores the foreground of the |
| bool | ignoreFillBackground | When true, ignores the background of the |
| bool | ignoreFillGlyph | When true, ignores the glyph of the |
| bool | ignoreFillMirror | When true, ignores the mirror of the |
Returns
| Type | Description |
|---|---|
| ShapeParameters | The shape parameters. |
CreateStyledBox(int[], ColoredGlyphBase, bool, bool, bool)
Creates a shape parameters object that describes a border using a connected line glyph set.
Declaration
public static ShapeParameters CreateStyledBox(int[] borderStyle, ColoredGlyphBase borderColors, bool ignoreBorderForeground = false, bool ignoreBorderBackground = false, bool ignoreBorderMirror = false)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | borderStyle | The connected line glyphs that make up the border. |
| ColoredGlyphBase | borderColors | The appearance colors of the border. |
| bool | ignoreBorderForeground | When true, ignores the foreground of the |
| bool | ignoreBorderBackground | When true, ignores the background of the |
| bool | ignoreBorderMirror | When true, ignores the mirror of the |
Returns
| Type | Description |
|---|---|
| ShapeParameters | The shape parameters. |
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.
Declaration
public static ShapeParameters CreateStyledBoxExplicit(ColoredGlyphBase[] borderGlyphs, bool ignoreBorderForeground = false, bool ignoreBorderBackground = false, bool ignoreBorderMirror = true)
Parameters
| Type | Name | Description |
|---|---|---|
| ColoredGlyphBase[] | borderGlyphs | The appearances used for each part of a connected line, specifically the glyph. |
| bool | ignoreBorderForeground | When true, ignores the foreground of the |
| bool | ignoreBorderBackground | When true, ignores the background of the |
| bool | ignoreBorderMirror | When true, ignores the mirror of the |
Returns
| Type | Description |
|---|---|
| ShapeParameters | The shape parameters. |
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.
Declaration
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)
Parameters
| Type | Name | Description |
|---|---|---|
| ColoredGlyphBase[] | borderGlyphs | The appearances used for each part of a connected line, specifically the glyph. |
| ColoredGlyphBase | fillStyle | The appearance colors of the fill. |
| bool | ignoreBorderForeground | When true, ignores the foreground of the |
| bool | ignoreBorderBackground | When true, ignores the background of the |
| bool | ignoreBorderGlyph | When true, ignores the glyph of the |
| bool | ignoreBorderMirror | When true, ignores the mirror of the |
| bool | ignoreFillForeground | When true, ignores the foreground of the |
| bool | ignoreFillBackground | When true, ignores the background of the |
| bool | ignoreFillGlyph | When true, ignores the glyph of the |
| bool | ignoreFillMirror | When true, ignores the mirror of the |
Returns
| Type | Description |
|---|---|
| ShapeParameters | The shape parameters. |
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.
Declaration
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)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | borderStyle | The connected line glyphs that make up the border. |
| ColoredGlyphBase | borderColors | The appearance colors of the border. |
| ColoredGlyphBase | fillStyle | The appearance colors of the fill. |
| bool | ignoreBorderForeground | When true, ignores the foreground of the |
| bool | ignoreBorderBackground | When true, ignores the background of the |
| bool | ignoreBorderMirror | When true, ignores the mirror of the |
| bool | ignoreFillForeground | When true, ignores the foreground of the |
| bool | ignoreFillBackground | When true, ignores the background of the |
| bool | ignoreFillGlyph | When true, ignores the glyph of the |
| bool | ignoreFillMirror | When true, ignores the mirror of the |
Returns
| Type | Description |
|---|---|
| ShapeParameters | The shape parameters. |
CreateStyledBoxThick(Color)
Creates a box using the ConnectedLineThick connected line style.
Declaration
public static ShapeParameters CreateStyledBoxThick(Color foreground)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | foreground | The foreground color of the box. |
Returns
| Type | Description |
|---|---|
| ShapeParameters | The shape parameters. |
CreateStyledBoxThin(Color)
Creates a box using the ConnectedLineThin connected line style.
Declaration
public static ShapeParameters CreateStyledBoxThin(Color foreground)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | foreground | The foreground color of the box. |
Returns
| Type | Description |
|---|---|
| ShapeParameters | The shape parameters. |