struct
Sheen::Position
- Sheen::Position
- Struct
- Value
- Object
Overview
A position along an axis, used for alignment, joining, and placement.
- 0.0: the start at top/left
- 0.5: the center
- 1.0: the end at bottom/right
Values outside 0.0..1.0 are clamped when applied
Defined in:
sheen/position.crConstant Summary
-
BOTTOM =
Position.new(1.0) -
The end of an axis
-
CENTER =
Position.new(0.5) -
The middle of an axis
-
LEFT =
Position.new(0.0) -
RIGHT =
Position.new(1.0) -
TOP =
Position.new(0.0) -
The start of an axis
Constructors
-
.new(value : Float64)
Creates a position from a raw fraction, clamped only on use via
#fraction
Instance Method Summary
-
#fraction : Float64
Clamps @value to 0.0..1.0
- #value : Float64
Constructor Detail
def self.new(value : Float64)
#
Creates a position from a raw fraction, clamped only on use via #fraction