śĪn‰gĄ?      !"#$%&'()*+,-./0123456789:;<=>!diagrams-discuss@googlegroups.comNone+ ,Abstraction of the drawing surface details. FType of the monad that tracks the state from side-effecting commands. QType for a monad that writes Postscript using the commands we will define later. 9Handles opening and closing the file associated with the  passed  * and renders the commands built up in the    argument. *Renders multiple pages given as a list of   actions # to the file associated with the   argument. 9Builds a surface and performs an action on that surface. Clip with the current path. Start a new path. Close the current path. :Draw an arc given a center, radius, start, and end angle. Move the current point. JAdd a line to the current path from the current point to the given point. 6 The current point is also moved with this command. MAdd a cubic Bézier curve segment to the current path from the current point. 6 The current point is also moved with this command. CAdd a line segment to the current path using relative coordinates. LAdd a cubic Bézier curve segment to the current path from the current point  using relative coordinates. Stroke the current path. Fill the current path. <Fill the current path without affecting the graphics state. $Draw a string at the current point. CDraw a string by first measuring the width then offseting by half. @Draw a string uniformally scaling to fit within a bounding box. !PDraw a string with offset factors from center relative to the width and height. "3Apply a transform matrix to the current transform. #=Push the current state of the renderer onto the state stack. $6Replace the current state by popping the state stack. %!Push the current graphics state. & Pop the current graphics state. '<Push the current transform matrix onto the execution stack. (CSet the current transform matrix to be the matrix found by popping  the execution stack. )Set the color of the stroke. *Set the color of the fill. +Set the line width. ,Set the line cap style. -Set the line join method. .Set the dash style. /Set the fill rule. 0(Translate the current transform matrix. 1$Scale the current transform matrix. 2%Rotate the current transform matrix. 3Set the font face. 4Set the font slant. 5Set the font weight. 6Set the font size. \?@ABCD EFGHIJ KL MNOPQRSTUVWXYx-coordinate of center. y-coordiante of center. raidus. start angle in radians. end angle in radians.  !"Z#$%&'([)*+,-.Dash pattern (even indices are on). Offset. /\]^012_`abcd34566  !"#$%&'()*+,-./01234566  "#$%&'(012)*+,-./! 3456A?@ABCD EFGHIJ KL  MNOPQRSTUVWXY !"Z#$%&'([)*+,-./\]^012_`abcd3456!diagrams-discuss@googlegroups.comNone7TPostscript only supports EPS style output at the moment. Future formats would each @ have their own associated properties that affect the output. 8 Encapsulated Postscript output. 9VThis data declaration is simply used as a token to distinguish this rendering engine. eHandle " miscellaneous"* style attributes (clip, font stuff, fill  color and fill rule). 789:fgehijklmnopqr 789:stuv9:78789:fgehijklmnopqr!diagrams-discuss@googlegroups.comNone;@This is the simplest way to render diagrams, and is intended to  be used like so:   ... other definitions ...  myDiagram = ...   main = defaultMain myDiagram ACompiling a source file like the above example will result in an E executable which takes command-line options for setting the size, ' output file, and so on, and renders  myDiagram with the  specified options. Pass --help2 to the generated executable to see all available / options. Currently it looks something like   " Command-line diagram generation.   Foo [OPTIONS]  Common flags: < -w --width=INT Desired width of the output image = -h --height=INT Desired height of the output image & -o --output=FILE Output file @ -f --fpu=FLOAT Frames per unit time (for animations) / -? --help Display help message 4 -V --version Print version information /For example, a couple common scenarios include   $ ghc --make MyDiagram  #E output image.eps with a width of 400pt (and auto-determined height)  $ ./MyDiagram -o image.eps -w 400 < multiMain is like ;, except instead of a single C diagram it takes a list of diagrams paired with names as input. ) The generated executable then takes a  --selection option D specifying the name of the diagram that should be rendered. The A list of available diagrams may also be printed by passing the  option --list. Example usage:   $ ghc --make MultiTest  [1 of 1]: Compiling Main ( MultiTest.hs, MultiTest.o )  Linking MultiTest ...  $ ./MultiTest --list  Available diagrams:  foo bar  $ ./,MultiTest --selection bar -o Bar.eps -w 200 w6Display the list of diagrams available for rendering. = pagesMain is like ;, except instead of a single J diagram it takes a list of diagrams and each wil be rendered as a page  in the Postscript file. Example usage:   $ ghc --make MultiPage  [1 of 1]: Compiling Main ( MultiPage.hs, MultiPage.o )  Linking MultiPage ...  $ ./MultiPage -o Pages.ps -w 200 >animMain is like ;, but renders an animation D instead of a diagram. It takes as input an animation and produces + a command-line program which will crudely "render" the animation E by rendering one image for each frame, named by extending the given E output file name by consecutive integers. For example if the given  output file name is foo/blah.eps, the frames will be saved in  foo/ blah001.eps, foo/ blah002.eps, and so on (the number of D padding digits used depends on the total number of frames). It is C up to the user to take these images and stitch them together into $ an actual animation format (using, e.g. ffmpeg). BOf course, this is a rather crude method of rendering animations; B more sophisticated methods will likely be added in the future. The --fpu7 option can be used to control how many frames will be 2 output for each second (unit time) of animation. x indexize d n adds the integer index n to the end of the E output file name, padding with zeros if necessary so that it uses  at least d digits. yz{|}~€;‚ƒ„<w=>x9;<=>;<=>9 yz{|}~€;‚ƒ„<w=>x…       !"#$%&'()*+,-./0123456789:;<==>?@ABBCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyyIJz{|}~€‚diagrams-postscript-0.7Diagrams.Backend.PostscriptGraphics.Rendering.Postscript#Diagrams.Backend.Postscript.CmdLinediagrams-core-0.7Diagrams.Core.TypesOptions FontWeightFontWeightBoldFontWeightNormal FontSlantFontSlantObliqueFontSlantItalicFontSlantNormalSurfaceRenderPSWriter runPSWriter RenderState renderWithrenderPagesWithwithEPSSurfaceclipnewPath closePatharcmoveTolineTocurveTo relLineTo relCurveTostrokefill fillPreserveshowTextshowTextCentered showTextInBox showTextAlign transformsaverestoregsavegrestore saveMatrix restoreMatrix strokeColor fillColor lineWidthlineCaplineJoinsetDash setFillRule translatescalerotate setFontFace setFontSlant setFontWeight setFontSize OutputFormatEPS Postscript defaultMain multiMain pagesMainanimMainPostscriptFont_face_slant_weight_sizeheaderfooterwidthheightfileName runRenderRS _drawState_saved DrawStateDS _fillRule_fontemptyDSemptyRSdoRenderrenderPSmkPSCall mkPSCall'matrixPScolorPS showArray fromLineCap fromLineJoinstringPS epsHeader epsFooter defaultFont renderFont fontFromNamepostscriptMiscStyle sizeFromSpecrenderC fromFontSlantfromFontWeightpostscriptStylepostscriptTransf$fRenderableTextPostscript$fRenderablePathPostscript$fRenderableTrailPostscript$fRenderableSegmentPostscript$fMultiBackendPostscriptR2$fBackendPostscriptR2$fMonoidRenderPostscriptOptions psfileName psSizeSpecpsOutputFormat showDiaListindexize DiagramOptsoutput selectionlistfpu diagramOpts chooseRender renderDias' renderDia'