caver.adam wrote:For the life of me I can't figure out how to fill the blocks in an area. I've got the area defined. The blocks show. But I can't just fill the blocks.
You should use modification of MetaPost code which define the area blocks. All definitions are in folder: "/therion/mpost/". If you use Windows you should download the source code of Therion, and find the folder named "mpost". There are files "thPoint.mp", "thLine.mp", "thArea.mp", … Open the "thArea.mp" by any plain text editor and copy the definition of "a_blocks_SKBB" in your "layout" section in "thconfig" file between "code metapost" and "endcode" commands. Delete the "_SKBB" from the first line of definition. It should look as this:
########################################################################
layout test
code metapost
def a_blocks (expr p) =
T:=identity;
pickup PenC;
path q, qq; q = bbox p;
picture tmp_pic;
uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100);
tmp_pic := image(
for i = xpart llcorner q step 2uu until xpart urcorner q:
for j = ypart llcorner q step 2uu until ypart urcorner q:
qq := punked (((-.5uu,-.5uu)--(.5uu,-.5uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle)
randomized (uu/2))
rotated uniformdeviate(360)
shifted ((i,j) randomized 1.6uu);
if xpart (p intersectiontimes qq) < 0:
thclean qq;
thdraw qq;
fi;
endfor;
endfor;
);
clip tmp_pic to p;
drawoptions();
draw tmp_pic;
enddef;
endcode
endlayout
########################################################################
Find the line "thdraw qq;" and type under it the line "thfill qq;"
########################################################################
if xpart (p intersectiontimes qq) < 0:
thclean qq;
thdraw qq;
thfill qq;########################################################################
It is quite simple - "thdraw qq;" will draw the border of particular block and "thfill qq;" will fill it with defined color.
and as last step add to layout - after line "endcode" - definition of color of symbol:
########################################################################
symbol-color area blocks [20 40 0]
########################################################################
[20 40 0] is definition of color in MetaPost code. It represents RGB values from 0 to 100 % [0 0 0] is black [100 100 100] is white.
and you should receive something as this: