Stipe width dependent on plant size
authorJoachim Breitner <mail@joachim-breitner.de>
Thu, 23 Apr 2009 23:13:50 +0000 (01:13 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Thu, 23 Apr 2009 23:13:50 +0000 (01:13 +0200)
src/Lseed/Renderer/Cairo.hs

index 57ae2bb..0a5bab0 100644 (file)
@@ -82,6 +82,8 @@ renderPlant Bud = do
        -- fill
        return ()
 renderPlant (Stipe _ len p) = do
+       let l = len + plantLength p
+       setLineWidth (stipeWidth*(0.5 + 0.5 * sqrt l))
        moveTo 0 0
        lineTo 0 (len * stipeLength)
        stroke