Navigation
Synopsis Decrease (shrink) the size of a figure relative to its parent.
Function FProperty shrink(num hg, num vg)
Description Shrink the current figure relative to the figure it is contained in (its parent). Shrink is expressed as a factor smaller than 1.

Note that:
  • shrink(hvs) defines the shrink in both dimensions and is equivalent to hshrink(hvs), vshrink(hvs).
  • shrink(hs, vs) defines the shrink in both dimensions separately and is equivalent to hshrink(hs), vshrink(vs).
Also see hshrink and vshrink.
Examples
b1 = box(shrink(0.5), fillColor("blue"));
b2 = box(b1, size(100, 50), fillColor("yellow"));
render(b2);
s1
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.