
I am pleased to announce the release of version 0.4 of diagrams, a full-featured framework and embedded domain-specific language for declarative drawing. The last announcement was of the 0.1 release; there have been quite a few changes and improvements since then, including: - A new website including a gallery of examples: http://projects.haskell.org/diagrams/gallery.html - A new comprehensive user manual with lots of illustrative examples: http://projects.haskell.org/manual/diagrams-manual.html - New primitive shapes: rounded rectangles, wedges, and a new flexible API for generating polygons - Cubic splines - Basic text support - Support for external image primitives - Lots more convenient combinators, bug fixes, and improvements Cool, how can I try it out? --------------------------- For the truly impatient: cabal install gtk2hs-buildtools cabal install diagrams For the slightly less impatient, read the quick tutorial, which has detailed information about how to install the necessary packages and will introduce you to the fundamentals of the framework: http://projects.haskell.org/diagrams/tutorial/DiagramsTutorial.html For those who are even less impatient but want to really dig in and use the power features, read the user manual: http://projects.haskell.org/manual/diagrams-manual.html Cool, how can I contribute? --------------------------- There are lots of ways you can contribute! First, you may want to subscribe to the project mailing list (http://groups.google.com/group/diagrams-discuss), and/or come hang out in the #diagrams IRC channel on freenode.org. - There are lots of easy bug fixes, improvements, and feature requests just waiting for people wanting to get involved: see the bug tracker for a list of open tickets: http://code.google.com/p/diagrams/issues/list - The source repositories are mirrored using both darcs (on patch-tag.com) and git (on github.com), and patches are accepted in either place, thanks to Owen Stephen's great work on darcs-bridge [1]. - Create a higher-level module built on top of the diagrams framework (e.g. tree or graph layout, generating Turing machine configuration diagrams, Penrose tilings ... your imagination is the only limit!) and submit it for inclusion in a special diagrams-contrib package which will be created for such higher-level user-contributed modules. - Use diagrams to create some cool graphics and submit them for inclusion in the gallery. - Start your own project built on top of diagrams and let us know how it goes! - Last but certainly not least, just try it out for your pet graphics generation needs and contribute your bug reports and feature requests. Happy diagramming! Brought to you by the diagrams team: - Brent Yorgey - Ryan Yates with contributions from: - Sam Griffin - Claude Heiland-Allen - John Lato - Vilhelm Sjöberg - Luite Stegeman - Kanchalai Suveepattananont - Scott Walck [1] http://wiki.darcs.net/DarcsBridgeUsage

The correct URL for the manual is:
http://projects.haskell.org/diagrams/manual/diagrams-manual.html
Ryan
On Sun, Oct 23, 2011 at 2:47 PM, Brent Yorgey
I am pleased to announce the release of version 0.4 of diagrams, a full-featured framework and embedded domain-specific language for declarative drawing.
The last announcement was of the 0.1 release; there have been quite a few changes and improvements since then, including:
- A new website including a gallery of examples:
http://projects.haskell.org/diagrams/gallery.html
- A new comprehensive user manual with lots of illustrative examples:
http://projects.haskell.org/manual/diagrams-manual.html
- New primitive shapes: rounded rectangles, wedges, and a new flexible API for generating polygons
- Cubic splines
- Basic text support
- Support for external image primitives
- Lots more convenient combinators, bug fixes, and improvements
Cool, how can I try it out? ---------------------------
For the truly impatient:
cabal install gtk2hs-buildtools cabal install diagrams
For the slightly less impatient, read the quick tutorial, which has detailed information about how to install the necessary packages and will introduce you to the fundamentals of the framework:
http://projects.haskell.org/diagrams/tutorial/DiagramsTutorial.html
For those who are even less impatient but want to really dig in and use the power features, read the user manual:
http://projects.haskell.org/manual/diagrams-manual.html
Cool, how can I contribute? ---------------------------
There are lots of ways you can contribute! First, you may want to subscribe to the project mailing list (http://groups.google.com/group/diagrams-discuss), and/or come hang out in the #diagrams IRC channel on freenode.org.
- There are lots of easy bug fixes, improvements, and feature requests just waiting for people wanting to get involved: see the bug tracker for a list of open tickets:
http://code.google.com/p/diagrams/issues/list
- The source repositories are mirrored using both darcs (on patch-tag.com) and git (on github.com), and patches are accepted in either place, thanks to Owen Stephen's great work on darcs-bridge [1].
- Create a higher-level module built on top of the diagrams framework (e.g. tree or graph layout, generating Turing machine configuration diagrams, Penrose tilings ... your imagination is the only limit!) and submit it for inclusion in a special diagrams-contrib package which will be created for such higher-level user-contributed modules.
- Use diagrams to create some cool graphics and submit them for inclusion in the gallery.
- Start your own project built on top of diagrams and let us know how it goes!
- Last but certainly not least, just try it out for your pet graphics generation needs and contribute your bug reports and feature requests.
Happy diagramming!
Brought to you by the diagrams team:
- Brent Yorgey - Ryan Yates
with contributions from:
- Sam Griffin - Claude Heiland-Allen - John Lato - Vilhelm Sjöberg - Luite Stegeman - Kanchalai Suveepattananont - Scott Walck
[1] http://wiki.darcs.net/DarcsBridgeUsage
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks. This is attractive.
I remember (vaguely) a 'live page' ie where one could enter (into the
browser) changes to the diagrams code and see the results immediately.
Is that page there? (Or am I mixing up with something else?)
How does diagrams compare with graphviz? If this is an inappropriate
(type-wrong?) question thats ok :-) Its just that when I last looked at
graphviz I found the documentation somewhat impenetrable -- like much else
in Hackage -- lots of types, no examples.
On Mon, Oct 24, 2011 at 12:17 AM, Brent Yorgey
I am pleased to announce the release of version 0.4 of diagrams, a full-featured framework and embedded domain-specific language for declarative drawing.
The last announcement was of the 0.1 release; there have been quite a few changes and improvements since then, including:
- A new website including a gallery of examples:
http://projects.haskell.org/diagrams/gallery.html
- A new comprehensive user manual with lots of illustrative examples:
http://projects.haskell.org/manual/diagrams-manual.html
- New primitive shapes: rounded rectangles, wedges, and a new flexible API for generating polygons
- Cubic splines
- Basic text support
- Support for external image primitives
- Lots more convenient combinators, bug fixes, and improvements
Cool, how can I try it out? ---------------------------
For the truly impatient:
cabal install gtk2hs-buildtools cabal install diagrams
For the slightly less impatient, read the quick tutorial, which has detailed information about how to install the necessary packages and will introduce you to the fundamentals of the framework:
http://projects.haskell.org/diagrams/tutorial/DiagramsTutorial.html
For those who are even less impatient but want to really dig in and use the power features, read the user manual:
http://projects.haskell.org/manual/diagrams-manual.html
Cool, how can I contribute? ---------------------------
There are lots of ways you can contribute! First, you may want to subscribe to the project mailing list (http://groups.google.com/group/diagrams-discuss), and/or come hang out in the #diagrams IRC channel on freenode.org.
- There are lots of easy bug fixes, improvements, and feature requests just waiting for people wanting to get involved: see the bug tracker for a list of open tickets:
http://code.google.com/p/diagrams/issues/list
- The source repositories are mirrored using both darcs (on patch-tag.com) and git (on github.com), and patches are accepted in either place, thanks to Owen Stephen's great work on darcs-bridge [1].
- Create a higher-level module built on top of the diagrams framework (e.g. tree or graph layout, generating Turing machine configuration diagrams, Penrose tilings ... your imagination is the only limit!) and submit it for inclusion in a special diagrams-contrib package which will be created for such higher-level user-contributed modules.
- Use diagrams to create some cool graphics and submit them for inclusion in the gallery.
- Start your own project built on top of diagrams and let us know how it goes!
- Last but certainly not least, just try it out for your pet graphics generation needs and contribute your bug reports and feature requests.
Happy diagramming!
Brought to you by the diagrams team:
- Brent Yorgey - Ryan Yates
with contributions from:
- Sam Griffin - Claude Heiland-Allen - John Lato - Vilhelm Sjöberg - Luite Stegeman - Kanchalai Suveepattananont - Scott Walck
[1] http://wiki.darcs.net/DarcsBridgeUsage
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 24 October 2011 13:51, Rustom Mody
How does diagrams compare with graphviz? If this is an inappropriate (type-wrong?) question thats ok :-) Its just that when I last looked at graphviz I found the documentation somewhat impenetrable -- like much else in Hackage -- lots of types, no examples.
How is it now, better? If not, what kind of more documentation would you like? The difference between the two is: graphviz requires an external command to create the visualisations and is suited towards converting graph data into an image using various heuristics to try and make it look nice; diagrams seems to be more towards drawing specific images following specified rules. So, you could implement something like graphviz using diagrams as a backend, but you'd then need to have some transformation from a list of points+edges to actual 2D coords, etc. Hmmm... might be interesting to try and use dot/neato/etc. to do the layout of a graph, and then use diagrams for the actual visualisation... -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Mon, Oct 24, 2011 at 03:46:26PM +1100, Ivan Lazar Miljenovic wrote:
Hmmm... might be interesting to try and use dot/neato/etc. to do the layout of a graph, and then use diagrams for the actual visualisation...
I agree! This has been on my list of things-to-do-with-diagrams-eventually for quite a while. It shouldn't even be very hard since your graphviz bindings can so nicely round-trip a graph description through dot/neato/etc. (right?) graphviz is great at graph layout but not so hot at graph *drawing*. -Brent

On 25 October 2011 04:25, Brent Yorgey
On Mon, Oct 24, 2011 at 03:46:26PM +1100, Ivan Lazar Miljenovic wrote:
Hmmm... might be interesting to try and use dot/neato/etc. to do the layout of a graph, and then use diagrams for the actual visualisation...
I agree! This has been on my list of things-to-do-with-diagrams-eventually for quite a while. It shouldn't even be very hard since your graphviz bindings can so nicely round-trip a graph description through dot/neato/etc. (right?)
Yup, it can. It also has support for more easily adding and pulling out "custom" attributes if you want to be able to tag them with more information (albeit only with Text values at the moment); for example, I use this for the round-trip'ing to be able to distinguish multiple edges from each other. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Mon, Oct 24, 2011 at 10:16 AM, Ivan Lazar Miljenovic < ivan.miljenovic@gmail.com> wrote:
On 24 October 2011 13:51, Rustom Mody
wrote: How does diagrams compare with graphviz? If this is an inappropriate (type-wrong?) question thats ok :-) Its just that when I last looked at graphviz I found the documentation somewhat impenetrable -- like much else in Hackage -- lots of types, no examples.
How is it now, better? If not, what kind of more documentation would you like?
Without claiming to have looked very hard, I looked up grahhviz in hayoo, gathered I should be looking at Data.GraphViz and tried clicking everything that looked reasonable here but still cant find an example of a graph :-) ie a graphviz graph in haskell. Is this a complaint against graphviz or against hackage/cabal etc?? Dunno. [Maybe I am just tired]

On 25 October 2011 16:02, Rustom Mody
On Mon, Oct 24, 2011 at 10:16 AM, Ivan Lazar Miljenovic
wrote: On 24 October 2011 13:51, Rustom Mody
wrote: How does diagrams compare with graphviz? If this is an inappropriate (type-wrong?) question thats ok :-) Its just that when I last looked at graphviz I found the documentation somewhat impenetrable -- like much else in Hackage -- lots of types, no examples.
How is it now, better? If not, what kind of more documentation would you like?
Without claiming to have looked very hard, I looked up grahhviz in hayoo, gathered I should be looking at Data.GraphViz and tried clicking everything that looked reasonable here but still cant find an example of a graph :-) ie a graphviz graph in haskell.
Well, there are indeed examples in there, but not in Data.GraphViz: that module is aimed more at "how can I convert my existing data into a Dot representation", not constructing one by hand. As of the latest version (2999.12.*), there are indeed examples for anyone that wants them: * Sample graph in Dot representation used as a base case: http://hackage.haskell.org/packages/archive/graphviz/2999.12.0.3/doc/html/Da... * Using the canonical representation: http://hackage.haskell.org/packages/archive/graphviz/2999.12.0.3/doc/html/Da... * Using the graph representation: http://hackage.haskell.org/packages/archive/graphviz/2999.12.0.3/doc/html/Da... * Using the Monadic representation (based upon the dotgen package): http://hackage.haskell.org/packages/archive/graphviz/2999.12.0.3/doc/html/Da... The Data.GraphViz.Types module also has a short description of how to choose which representation. However, I'll add a note in Data.GraphViz telling people to look in Data.GraphViz.Types if they want to construct a Dot graph by hand.
Is this a complaint against graphviz or against hackage/cabal etc?? Dunno.
I'd say it's more a case of: to the maintainer, it's _obvious_ how to do stuff since they're intimately familiar with the details; as such, if something isn't clear let them know that you're confused by something (which at least in my case jogs me to go and add extra clarification on such matters)! -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Tue, Oct 25, 2011 at 10:40 AM, Ivan Lazar Miljenovic < ivan.miljenovic@gmail.com> wrote:
On 25 October 2011 16:02, Rustom Mody
wrote: On Mon, Oct 24, 2011 at 10:16 AM, Ivan Lazar Miljenovic
wrote: On 24 October 2011 13:51, Rustom Mody
wrote: How does diagrams compare with graphviz? If this is an inappropriate (type-wrong?) question thats ok :-) Its just that when I last looked
at
graphviz I found the documentation somewhat impenetrable -- like much else in Hackage -- lots of types, no examples.
How is it now, better? If not, what kind of more documentation would you like?
Without claiming to have looked very hard, I looked up grahhviz in hayoo, gathered I should be looking at Data.GraphViz and tried clicking everything that looked reasonable here but still cant find an example of a graph :-) ie a graphviz graph in haskell.
Well, there are indeed examples in there, but not in Data.GraphViz: that module is aimed more at "how can I convert my existing data into a Dot representation", not constructing one by hand. As of the latest version (2999.12.*), there are indeed examples for anyone that wants them:
* Sample graph in Dot representation used as a base case:
http://hackage.haskell.org/packages/archive/graphviz/2999.12.0.3/doc/html/Da... * Using the canonical representation:
http://hackage.haskell.org/packages/archive/graphviz/2999.12.0.3/doc/html/Da... * Using the graph representation:
http://hackage.haskell.org/packages/archive/graphviz/2999.12.0.3/doc/html/Da... * Using the Monadic representation (based upon the dotgen package):
http://hackage.haskell.org/packages/archive/graphviz/2999.12.0.3/doc/html/Da...
Thanks. In the Data.GraphViz.Types.Generalised page you have the starting line: It is sometimes useful to be able to manipulate a Dot graph *as* an actual graph. This representation lets you do so... Evidently some other context is needed to understand this line? [Sorry if I am dense]

On 26 October 2011 02:17, Rustom Mody
In the Data.GraphViz.Types.Generalised page you have the starting line:
It is sometimes useful to be able to manipulate a Dot graph as an actual graph. This representation lets you do so...
Evidently some other context is needed to understand this line? [Sorry if I am dense]
It means that you can treat it as a graph data structure: add/delete nodes/edges, get neighbours of a node, etc. Whereas if you wanted to delete a node from the other representations, you would manually have to traverse the entire data structure explicitly to delete that node and any edge it may be in. The use case is is for manipulating existing Dot code better; generally speaking, if you are converting data _into_ a Dot graph, then you would do any such manipulations before you do the conversions. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Rustom Mody
I remember (vaguely) a 'live page' ie where one could enter (into the browser) changes to the diagrams code and see the results immediately. Is that page there? (Or am I mixing up with something else?)
Chris Smith's web interface to Ben Lippmeier's Gloss, perhaps? http://dac4.designacourse.com:8000/ -k -- If I haven't seen further, it is by standing in the footprints of giants

Rustom Mody
writes: I remember (vaguely) a 'live page' ie where one could enter (into the browser) changes to the diagrams code and see the results immediately. Is that page there? (Or am I mixing up with something else?)
Maybe it was Péter Diviánszky's 'dia' (entirely different to 'diagrams') ? http://pnyf.inf.elte.hu/fp/Diagrams_en.xml

On Mon, Oct 24, 2011 at 10:17 PM, Stephen Tetley
Rustom Mody
writes: I remember (vaguely) a 'live page' ie where one could enter (into the browser) changes to the diagrams code and see the results immediately. Is that page there? (Or am I mixing up with something else?)
Maybe it was Péter Diviánszky's 'dia' (entirely different to 'diagrams') ?
Yes that was it (It is called diagrams :-)

On Mon, Oct 24, 2011 at 08:21:30AM +0530, Rustom Mody wrote:
Thanks. This is attractive. I remember (vaguely) a 'live page' ie where one could enter (into the browser) changes to the diagrams code and see the results immediately. Is that page there? (Or am I mixing up with something else?)
You might also have been thinking of Luite Stegeman's "Wolfgang Lambda" project, which supports diagrams in this way (as well as many other things!). There was an early preview version of it up for a little while which a bunch of people saw, but it's not ready for release yet.
How does diagrams compare with graphviz? If this is an inappropriate (type-wrong?) question thats ok :-) Its just that when I last looked at graphviz I found the documentation somewhat impenetrable -- like much else in Hackage -- lots of types, no examples.
graphviz is a special-purpose tool for doing graph layout and visualization. diagrams is a general-purpose framework for drawing anything at all. As for documentation, you do realize that the graphviz package on Hackage is a set of bindings? So there's a lot of helpful documentation at http://www.graphviz.org/ . One of my goals with diagrams is to have excellent documentation, so if you find anything that is unclear or poorly documented, please file a bug report (http://code.google.com/p/diagrams/issues/list)! -Brent

Is there any way to `query` a diagram, i.e. associate data with each pixel
for mouse clicks? Or are the composition rules mostly write-only?
On Sun, Oct 23, 2011 at 11:47 AM, Brent Yorgey
I am pleased to announce the release of version 0.4 of diagrams, a full-featured framework and embedded domain-specific language for declarative drawing.
The last announcement was of the 0.1 release; there have been quite a few changes and improvements since then, including:
- A new website including a gallery of examples:
http://projects.haskell.org/diagrams/gallery.html
- A new comprehensive user manual with lots of illustrative examples:
http://projects.haskell.org/manual/diagrams-manual.html
- New primitive shapes: rounded rectangles, wedges, and a new flexible API for generating polygons
- Cubic splines
- Basic text support
- Support for external image primitives
- Lots more convenient combinators, bug fixes, and improvements
Cool, how can I try it out? ---------------------------
For the truly impatient:
cabal install gtk2hs-buildtools cabal install diagrams
For the slightly less impatient, read the quick tutorial, which has detailed information about how to install the necessary packages and will introduce you to the fundamentals of the framework:
http://projects.haskell.org/diagrams/tutorial/DiagramsTutorial.html
For those who are even less impatient but want to really dig in and use the power features, read the user manual:
http://projects.haskell.org/manual/diagrams-manual.html
Cool, how can I contribute? ---------------------------
There are lots of ways you can contribute! First, you may want to subscribe to the project mailing list (http://groups.google.com/group/diagrams-discuss), and/or come hang out in the #diagrams IRC channel on freenode.org.
- There are lots of easy bug fixes, improvements, and feature requests just waiting for people wanting to get involved: see the bug tracker for a list of open tickets:
http://code.google.com/p/diagrams/issues/list
- The source repositories are mirrored using both darcs (on patch-tag.com) and git (on github.com), and patches are accepted in either place, thanks to Owen Stephen's great work on darcs-bridge [1].
- Create a higher-level module built on top of the diagrams framework (e.g. tree or graph layout, generating Turing machine configuration diagrams, Penrose tilings ... your imagination is the only limit!) and submit it for inclusion in a special diagrams-contrib package which will be created for such higher-level user-contributed modules.
- Use diagrams to create some cool graphics and submit them for inclusion in the gallery.
- Start your own project built on top of diagrams and let us know how it goes!
- Last but certainly not least, just try it out for your pet graphics generation needs and contribute your bug reports and feature requests.
Happy diagramming!
Brought to you by the diagrams team:
- Brent Yorgey - Ryan Yates
with contributions from:
- Sam Griffin - Claude Heiland-Allen - John Lato - Vilhelm Sjöberg - Luite Stegeman - Kanchalai Suveepattananont - Scott Walck
[1] http://wiki.darcs.net/DarcsBridgeUsage
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Sun, Oct 23, 2011 at 11:06:19PM -0700, David Barbour wrote:
Is there any way to `query` a diagram, i.e. associate data with each pixel for mouse clicks?
Yes. Every diagram has an associated 'query function', which associates a monoidal value to every point. By default it just returns True/False indicating whether the given point is in the interior of any shape, but you can use any monoid you like. I believe John Lato has been using this in conjunction with the support for rendering directly to a gtk widget to develop some sort of interactive graphical application (I don't know many details). For more info see http://projects.haskell.org/diagrams/manual/diagrams-manual.html#using-queri... -Brent

Thanks. Diagrams package seems it could be promising for a declarative UI model - i.e. integration with functional reactive programming and similar models - so long as I'm willing to sacrifice `native` look and feel, which doesn't seem like a big problem. A couple more questions: 1) Am I right in assuming that Diagrams does very little `occlusion` of its own - i.e. when rendering a soda-straw view of a complex diagram, or masking large areas with a rectangle or sphere? There won't be any competition or redundancy with an external index and backend (e.g. Cairo-GL layer) occlusion? 2) Is there support for Cairo-like linear and radial gradients? Also, it seems that for Cairo rendering, we cannot currently supply our own Cairo context.
renderDia Cairo (CairoOptions "foo.png" (PNG (100,100))) myDiagram
This section of your manual is incomplete, I admit, but from browsing the
code it seems you provide a simplified interface that fully encapsulates the
Cairo rendering. Is there any way to render a diagram within the Cairo
stack? or leverage Cairo's own experimental backends (like OpenGL)?
Regards,
Dave
On Mon, Oct 24, 2011 at 10:41 AM, Brent Yorgey
Is there any way to `query` a diagram, i.e. associate data with each
On Sun, Oct 23, 2011 at 11:06:19PM -0700, David Barbour wrote: pixel
for mouse clicks?
Yes. Every diagram has an associated 'query function', which associates a monoidal value to every point. By default it just returns True/False indicating whether the given point is in the interior of any shape, but you can use any monoid you like. I believe John Lato has been using this in conjunction with the support for rendering directly to a gtk widget to develop some sort of interactive graphical application (I don't know many details).
For more info see
http://projects.haskell.org/diagrams/manual/diagrams-manual.html#using-queri...
-Brent
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Mon, Oct 24, 2011 at 11:55:53AM -0700, David Barbour wrote:
Thanks.
Diagrams package seems it could be promising for a declarative UI model - i.e. integration with functional reactive programming and similar models - so long as I'm willing to sacrifice `native` look and feel, which doesn't seem like a big problem.
Yes, I imagine it could. Not one of the use cases I personally had in mind -- but I've been hoping that people will find it useful for things I had not thought of.
A couple more questions: 1) Am I right in assuming that Diagrams does very little `occlusion` of its own - i.e. when rendering a soda-straw view of a complex diagram, or masking large areas with a rectangle or sphere? There won't be any competition or redundancy with an external index and backend (e.g. Cairo-GL layer) occlusion?
Right, diagrams currently doesn't do any sort of "culling", occlusion, etc., that's all up to the backend.
2) Is there support for Cairo-like linear and radial gradients?
Not yet, but it's on the todo list.
Also, it seems that for Cairo rendering, we cannot currently supply our own Cairo context.
renderDia Cairo (CairoOptions "foo.png" (PNG (100,100))) myDiagram
This section of your manual is incomplete, I admit, but from browsing the code it seems you provide a simplified interface that fully encapsulates the Cairo rendering. Is there any way to render a diagram within the Cairo stack? or leverage Cairo's own experimental backends (like OpenGL)?
You're right, currently there's no way do these sorts of things. However, there's no fundamental limitation here and adding this sort of functionality should not be hard, and I'd be quite open to extending the cairo backend in this direction. -Brent

On Sun, Oct 23, 2011 at 11:47 AM, Brent Yorgey
I am pleased to announce the release of version 0.4 of diagrams, a full-featured framework and embedded domain-specific language for declarative drawing.
The last announcement was of the 0.1 release; there have been quite a few changes and improvements since then, including:
- A new website including a gallery of examples:
http://projects.haskell.org/diagrams/gallery.html
- A new comprehensive user manual with lots of illustrative examples:
http://projects.haskell.org/manual/diagrams-manual.html
- New primitive shapes: rounded rectangles, wedges, and a new flexible API for generating polygons
- Cubic splines
- Basic text support
What do you use for text support? I know at one point you were interested in my freetype2 binding (which is still very raw and immature), but you must be using gtk for font loading and rendering? Jason

On Mon, Oct 24, 2011 at 01:58:33PM -0700, Jason Dagit wrote:
On Sun, Oct 23, 2011 at 11:47 AM, Brent Yorgey
wrote: I am pleased to announce the release of version 0.4 of diagrams, a full-featured framework and embedded domain-specific language for declarative drawing.
What do you use for text support? I know at one point you were interested in my freetype2 binding (which is still very raw and immature), but you must be using gtk for font loading and rendering?
At the moment, text is completely delegated to backends. diagrams itself doesn't do any font loading or rendering at all. However, the obvious downside to this is that the framework itself has no idea how big a given piece of text is and can't position it relative to other things. On the todo list is to use your freetype2 binding (or something like it) to actually do more work within the framework itself, so it can position text correctly, convert text outlines into paths, and so on. -Brent
participants (8)
-
Brent Yorgey
-
David Barbour
-
Ivan Lazar Miljenovic
-
Jason Dagit
-
Ketil Malde
-
Rustom Mody
-
Ryan Yates
-
Stephen Tetley