[Therion] Colored Lines Based On Attributes

Carl Magnuson magnu213 at umn.edu
Fri Sep 11 22:35:03 CEST 2009


I am attempting to color the walls of different systems with different  
colors using the -attr flag and a user defined wall:

portion of code in scrap:
line u:wall -attr color "(0.1, 0.2, 0.8);"
1392.9359853260457 -71.62435442682576
1395.5759853260456 125.20564557317425
endline

portion of code in layout:
def l_u_wall (expr P)=
	T:=identity;
	if known(ATTR__color):
		pickup PenA;
		draw P withpen PenA withcolor ATTR__color\n
	fi;
enddef;

initsymbol(\"l_u_wall\");

I am not having any success however.  Is it possible to set and read  
attributes from lines as I am trying to do? Is somebody aware of an  
alternate way to pass in a color argument to the metapost definition  
(instead of defining separate walls for each different colored system)?

Thanks,

Carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20090911/9a72ff62/attachment.htm>


More information about the Therion mailing list