![]() |
|
Navigation |
Synopsis Creates a horizontal screen on which things can be projected.
Function
Figure hscreen(Figure inner,FProperty prop...)
Description Figures nested within the hscreen can project figures onto the screen using the project property. A screen must have an id property giving its name.
The position of the hscreen depends on the alignment of the inner figure. If the inner figure is placed at the top then the screen will be at the bottom and vice versa. i = hcat([box(fillColor("red"),project(text(s),"hscreen")) | s <- ["a","b","c","d"]],top()); sc = hscreen(i,id("hscreen")); render(sc); ![]() i = hcat([box(fillColor("red"),project(text(s),"hscreen")) | s <- ["a","b","c","d","e","f"]],bottom()); sc = hscreen(i,id("hscreen")); render(sc); ![]() If the inner figure specifies a shrink then the remaining size is used for the screen, otherwise the minimal size is used. i = hcat([box(fillColor("red"),project(text(s),"hscreen")) | s <- ["a","b","c","d","e","f"]],vshrink(0.5),top()); sc = hscreen(i,id("hscreen")); render(sc); ![]() Alignment and shrinking of projected figures also works. boxes = [box(project(box(text(s),fillColor("green"),shrink(c),a),"hscreen"),fillColor("red")) | <s,a,c> <- [<"a",left(),0.6>,<"b",top(),0.9>,<"c",right(),0.5>,<"d",bottom(),0.4>]]; s = hscreen(hcat(boxes,hgrow(1.2),top(),vshrink(0.8)),id("hscreen")); render(s); ![]() Also see vscreen. ![]() |