# taken and adapted from github SpeleoPhilippines under Creative Commons Share Alike ### index of file options from _layouts.mp #copy custom_flowstone #copy custom_water_blue #copy custom_legend_large_format_5U #copy custom_scalebar #borrowedstolen base from AndrewAtkinson Wookeyhole template #copy custom_continuations ############################################################################################################################# layout custom_flowstone symbol-assign area flowstone TEST code metapost initsymbol ("a_flowstone_TEST"); beginpattern(pattern_flowstone_TEST); pickup PenC;​ p:=(-.25u,0){dir -60} .. {dir 60}(0.25u,0);​ draw p;​ draw p shifted (0.35u,0.4u);​ patternxstep(0.9u);​ patternystep(0.30u);​ endpattern; def a_flowstone_TEST (expr Path) = T:=identity;​ thclean Path;​ thfill Path withpattern pattern_flowstone_TEST;​ enddef; endcode endlayout ############################################################################################################################# layout custom_water_blue code metapost # define water to be light blue def a_water (expr p) = T:=identity; #nice light blue - but nearly same as level colour - change back when we have control of that # thfill p withcolor (0.48, 0.84, 1.0); thfill p withcolor (0.0, 0.0, 1.0); enddef; # define sump to be dark blue def a_sump (expr p) = T:=identity; thfill p withcolor (0.05, 0.0, 0.7); enddef; endcode endlayout ############################################################################################################################# layout custom_legend_large_format_5U code metapost % code to make the legend boxes much bigger % def draw_legend_box = %make the objects in the legend boxes bigger currentpicture := currentpicture scaled 1.7; clip currentpicture to unitsquare scaled 5u; drawoptions(); pickup PenB; draw unitsquare scaled 5u ; enddef; %clear the background of the larger legend boxes def clean_legend_box = unfill unitsquare scaled 5u; enddef; %change the value of inscale to fill the legend boxes def inscale = xscaled legend_scale yscaled (0.618*legend_scale) %xscaled legend_scale yscaled legend_scale enddef; endcode endlayout ############################################################################################################################ layout custom_scalebar #Change the scale bar to black and white bar, split into 5 and labelled code metapost def s_scalebar (expr l, units, txt) = begingroup interim warningcheck:=0; tmpl:=l / Scale * cm * units / 2; tmpx:=l / Scale * cm * units / 5; tmph:=5bp; % bar height endgroup; pickup PenC; #Adjusted to make lines not stick out: 0.25*u/10,0 is half thickness of PenC draw (-tmpl+0.25*u/10,0)--(tmpl-0.25*u/10,0); draw (tmpl-0.25*u/10,-tmph)--(-tmpl+0.25*u/10,-tmph); p:=(0,0)--(tmpx,0)--(tmpx,-tmph)--(0,-tmph)--cycle; for i:=-2.5 step 2 until 2: fill p shifted (i * tmpx,0); endfor; begingroup interim labeloffset:=3.5bp; for i:=0 step (l/5) until (l-1): tmpx:=tmpl * (i * 2 / l - 1); label.top(thTEX(decimal (i)),(tmpx,0)); endfor; label.top(thTEX(decimal (l) & "\thinspace" & txt),(tmpl,0)); # label.bot(thTEX("Original Scale = 1 : " & decimal (Scale*100)),(0,-tmph)); endgroup; enddef; endcode endlayout ############################################################################################################################## layout custom_continuations #this metapost for continuations makes the text appear after the ? code metapost def p_continuation(expr pos,theta,sc,al) = % draw default continuation symbol ie ? p_continuation_UIS(pos,theta,sc,al); % if text attribute is set if known(ATTR__text) and picture(ATTR__text): % set labeling color to light orange push_label_fill_color(0.8, 0.8, 0.0); % draw filled label with text next to symbol ? p_label.urt(ATTR__text,(.5u,-.25u) transformed T,0.0,8); % restore original labeling color pop_label_fill_color; fi; enddef; endcode endlayout