reckfellENGINE

StyleBoxLine

Straight-line style with thickness and independent length growth.

On this page
class StyleBoxLineReckfellSharpInherits StyleBox

Defaults to a horizontal black line with Thickness = 1 and GrowBegin/GrowEnd = 1. Vertical changes the axis. Thickness supplies half-padding on each perpendicular side: horizontal thickness 5 gives minimum (0, 5), vertical gives (5, 0).

Explicit ContentMargin overrides these margins: zeroes can remove minimum size while retaining draw thickness. GrowBegin/End extend drawing along the axis without reserving layout length. Use nonnegative Thickness; setter does not constrain it. Grow values store floats, but drawing uses an integer rectangle. Even repeated identical colors/parameters emit Changed.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

StyleBoxLineConstructor
# StyleBoxLine
C#
public StyleBoxLine();

Creates a horizontal black line: Thickness = 1, GrowBegin = GrowEnd = 1, Vertical = false. Automatic margins yield minimum (0, 1).

Properties5

ColorProperty
# Color
C#
public Color Color { get; set; }

Line color/alpha, default opaque black. Setter emits Changed even for the same color.

GrowBeginProperty
# GrowBegin
C#
public float GrowBegin { get; set; }

Drawing extension from the starting edge along the line, default 1. Does not add length to minimum size; fractional values draw through an integer rect.

GrowEndProperty
# GrowEnd
C#
public float GrowEnd { get; set; }

Drawing extension beyond the ending edge, default 1. Does not change content padding or parent-allocated length.

ThicknessProperty
# Thickness
C#
public int Thickness { get; set; }

Line thickness in pixels, default 1. Supplies half-padding on perpendicular sides; ContentMargin can override it. Use a nonnegative number.

VerticalProperty
# Vertical
C#
public bool Vertical { get; set; }

true for vertical line axis, default false. Changes perpendicular automatic margins rather than parent-container orientation.

Methods10

GetColorColor
# GetColor
C#
public Color GetColor();

Line color/alpha, default opaque black. Setter emits Changed even for the same color.

Returns Color

Line color.

GetGrowBeginfloat
# GetGrowBegin
C#
public float GetGrowBegin();

Drawing extension from the starting edge along the line, default 1. Does not add length to minimum size; fractional values draw through an integer rect.

Returns float

Stored starting-edge drawing extension.

GetGrowEndfloat
# GetGrowEnd
C#
public float GetGrowEnd();

Drawing extension beyond the ending edge, default 1. Does not change content padding or parent-allocated length.

Returns float

Stored ending-edge drawing extension.

GetThicknessint
# GetThickness
C#
public int GetThickness();

Line thickness in pixels, default 1. Supplies half-padding on perpendicular sides; ContentMargin can override it. Use a nonnegative number.

Returns int

Stored line thickness in pixels.

IsVerticalbool
# IsVertical
C#
public bool IsVertical();

true for vertical line axis, default false. Changes perpendicular automatic margins rather than parent-container orientation.

Returns bool

true for a vertical line.

SetColorvoid
# SetColor
C#
public void SetColor(Color color);

Line color/alpha, default opaque black. Setter emits Changed even for the same color.

Parameters
NameTypeDefault
colorColor—
color

Line color/alpha, default opaque black. Setter emits Changed even for the same color.

SetGrowBeginvoid
# SetGrowBegin
C#
public void SetGrowBegin(float offset);

Drawing extension from the starting edge along the line, default 1. Does not add length to minimum size; fractional values draw through an integer rect.

Parameters
NameTypeDefault
offsetfloat—
offset

Drawing extension from the starting edge along the line, default 1. Does not add length to minimum size; fractional values draw through an integer rect.

SetGrowEndvoid
# SetGrowEnd
C#
public void SetGrowEnd(float offset);

Drawing extension beyond the ending edge, default 1. Does not change content padding or parent-allocated length.

Parameters
NameTypeDefault
offsetfloat—
offset

Drawing extension beyond the ending edge, default 1. Does not change content padding or parent-allocated length.

SetThicknessvoid
# SetThickness
C#
public void SetThickness(int thickness);

Line thickness in pixels, default 1. Supplies half-padding on perpendicular sides; ContentMargin can override it. Use a nonnegative number.

Parameters
NameTypeDefault
thicknessint—
thickness

Line thickness in pixels, default 1. Supplies half-padding on perpendicular sides; ContentMargin can override it. Use a nonnegative number.

SetVerticalvoid
# SetVertical
C#
public void SetVertical(bool vertical);

true for vertical line axis, default false. Changes perpendicular automatic margins rather than parent-container orientation.

Parameters
NameTypeDefault
verticalbool—
vertical

true for vertical line axis, default false. Changes perpendicular automatic margins rather than parent-container orientation.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.