Code: Select all
cutter = require("cutter")
-- function cutter.cut(width, height, [alignment], [container])
-- a box 50% of the screen size (Blue)
box1 = cutter.cut(0.5, 0.5, "center")
-- a box half the height of the first box, aligned to the bottom (Green)
box2 = cutter.cut(1, 0.5, "bottom", box1)
-- a box half the width of the previous, left aligned (Red)
box3 = cutter.cut(0.5, 1, "left", box2)
The .love includes an interactive demo.