shamansir / tron-gui / Tron.Style.CellShape

Cell Shape

Cell Shape is the place it takes in nested panels. Considering the default shape as 1x1 (Full), the meaning of each value is:


type CellShape


type Unit
    = Single
    | Half
    | Twice

Values

default : CellShape

single : CellShape

1x1

half : CellShape

0.5x0.5

halfByOne : CellShape

0.5x1

oneByHalf : CellShape

1x0.5

twiceByHalf : CellShape

2x0.5

halfByTwice : CellShape

0.5x2

twiceByTwice : CellShape

2x2

Determine shape

isHorizontal : CellShape -> Basics.Bool

isVertical : CellShape -> Basics.Bool

isSquare : CellShape -> Basics.Bool

isSmallSquare : CellShape -> Basics.Bool

isLargeSquare : CellShape -> Basics.Bool

Other Helpers

numify : CellShape -> ( Basics.Float, Basics.Float )

units : CellShape -> ( Unit, Unit )

Get shape units as ( , )

create : ( Unit, Unit ) -> CellShape

Create cell shape from unit representation

toString : CellShape -> String