edge Hug Layout
fun edgeHugLayout(zone: RadialMenuMath.MenuZone, screenWidth: Float, screenHeight: Float, itemCount: Int, itemSizePx: Float, gapPx: Float, padPx: Float): List<Offset>(source)
Computes item center positions for the edge-hug L-shaped layout.
Items are split across the two available edges adjacent to the corner. The primary edge gets ceil(itemCount / 2) items, the secondary gets the remainder. The corner cell itself (the intersection of the two edges) is always vacant — items start one full step away from the corner.
Return
List of Offset item center positions, primary edge first.
Since
1.0.3
Parameters
zone
Which corner the touch is in. Must be a CORNER_* value.
screen Width
Screen width in pixels.
screen Height
Screen height in pixels.
item Count
Number of items to position.
item Size Px
Item diameter in pixels.
gap Px
Gap between items in pixels.
pad Px
Padding from screen edge in pixels.