-- | A module for rendering lines as an HTML5 file containing an SVG image. -- This can be used to visualize the denotational semantics of a MiniLogo -- program. -- -- NOTE: You should not change the definitions in this file! -- module Render (Point,Line,toHTML) where import Data.List (intercalate) -- | A point is a cartesian pair (x,y). type Point = (Int,Int) -- | A line is defined by its endpoints. type Line = (Point,Point) -- | Output a list of lines as an HTML5 file containing an SVG image. toHTML :: [Line] -> IO () toHTML ls = writeFile "MiniMiniLogo.html" (header ++ content ls ++ footer) -- -- Private definitions. All definitions below this point will not be visible -- from within a module that imports this module. -- scale, margin, width, height :: Int scale = 10 margin = 10 width = 800 height = 400 style = "fill:white;stroke:red;stroke-width:2" title = "