Navigation
Synopsis Define the minimal size of a figure.
Function Fproperty size(num h, num v)
Description Define the minimal size of a figure by setting hsize to h and vsize to v.

Note that:
  • size(hv) is equivalent to hsize(hv), vsize(hv).
  • size(h, v) is equivalent to hsize(h), vsize(v).
  • width is a synonym for hsize.
  • height is a synonym for vsize.
Examples By default, the following box
b1 = box(size(200,100), fillColor("red"));
render(b1);
will be displayed with the given minimal sizes: box1



By default all figures are resizable and will occupy all available space as determined by
  • the size of the parent figure.
  • the size of the window in which the figure is displayed.
If we enlarge the window in which b1 is displayed to, say, 400, 200, we get:
b1 = box(size(200,100), fillColor("red"));
render(b1);
box2

Resizing can be turned off by setting resizable to false.
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.