Navigation
Synopsis The fixed aspect ratio of a figure.
Function FProperty onClick(void() handler)
Description Defines the ratio between the horizontal and vertical size of a figure. This ratio is maintained whenever the figure is resized. An aspect ratio with value 1, turns boxes into squares and ellipses into circles.
Examples
e1 = ellipse(shrink(0.8),fillColor("yellow"));
b1 = box(e1,fillColor("red"));
render(e1);
a0

e1 = ellipse(shrink(0.8), aspectRatio(1.0),fillColor("yellow"));
b1 = box(e1,fillColor("red"));
render(e1);
a1

e1 = ellipse(shrink(0.8), aspectRatio(0.5),fillColor("yellow"));
b1 = box(e1,fillColor("red"));
render(e1);
a2
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.