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 <[email protected]>wrote: > 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-queries > > -Brent > > > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe >
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
