Navigation
Synopsis Define minimal gap between figures in compositions.
Function FProperty gap(num h, num v)
Description Set the minimal horizontal gap between figures to h and the minimal vertical gap to v.

Also see hgap and vgap.

Note that:
  • gap(hv) is equivalent to gap(hv, hv) and to hgap(hv), vgap(hv).
  • gap(h, v) is equivalent to hgap(h), vgap(v).
Examples
b1 = box(fillColor("blue"));
b2 = box(fillColor("yellow"));
b3 = box(fillColor("green"));
render(hcat([b1, b2, b2], gap(50)));
g1
b1 = box(fillColor("blue"));
b2 = box(b1,hgap(50),vgap(10),fillColor("yellow"));
render(b2);
g2

b1 = box(fillColor("blue"),left(),top());
b2 = box(b1,hgap(50),vgap(10),fillColor("yellow"));
render(b2);
g3
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.