Thanks Ian for the link. I will keep this work in mind though I don't think I could use it for my current project. It seems focused on rgbd matrix data type which is great for transparent dynamic graphics. Svg representation does really suits my needs for now since I'm visualizing non changing data (or rarely, or path/polygon types of data) in changing frame (zooming, moving, etc). So svg transformations are the only thing to change, no canvas recomputation.
For my image binary masks representation, I just stumbled upon Noah's elm-flat-matrix <http://package.elm-lang.org/packages/eeue56/elm-flat-matrix/latest/> lib which feels very interesting. The only thing a bit weird for matrix manipulation is the row-major implementation and notation (first index refers to column). This makes sense in the context of image manipulation though (with x corresponding to the width, being always the first coordinate). Regarding the transformation of the image file to matrix data, I feel like I have no other choice than to do it in JS. I found some interesting example of how to deal with this in the jimp <https://github.com/oliver-moran/jimp/blob/master/browser/src/jimp-wrapper.js> lib code. Since I can't escape JS for now, I might also try to visualize the binary masks with ports. The idea being that I create a dedicated tag+id in the elm view code. Pass the data and the id of the tag in which JS should include the visualization by generating the data uri to put in the dedicated tag. (hoping following elm view updates will not change this tag if no reason to - maybe by using html keyed ?). If anyone thinks I'm heading for a fall, please tell me. PS: Ian your OpenSolid repositories rock. I just switched to it instead of my previous home made solutions. I might have propositions also for an addition into the the Polygon2d and LineSegment2d modules but that's another story. On Mar 3, 2017 20:54, "Ian Mackenzie" <ian.e.macken...@gmail.com> wrote: For your second question, I know there's work being done currently on supporting the Canvas API in Elm (https://github.com/elm-community/canvas), which may be more appropriate for visualizing bitmap data than SVG, but it's still very experimental. -- You received this message because you are subscribed to a topic in the Google Groups "Elm Discuss" group. To unsubscribe from this topic, visit https://groups.google.com/d/to pic/elm-discuss/BbPBd8Rq2Pw/unsubscribe. To unsubscribe from this group and all its topics, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.