Graphics.Painting as a stand-alone module?

Hey all,

I’ve been experimenting with video on klank dev. Here is an example where you can hold down the mouse to change both the video and audio at the same time.

In order to do this, I’ve basically taken Graphics.Drawing verbatim and added a couple things for image rendering. I put this in a file called Graphics.Painting.

I was wondering what the community thinks about Graphics.Painting as a stand-alone package? Does it seem useful? Would it be more useful to make a new version of Graphics.Drawing with these changes? I know that @paluh is working on a larger and more full-featured graphics suite, so that could be a better fit - I’m curious to hear how that is going. Also curious to hear what @paf311 thinks as the original author of purescript-drawing.

3 Likes

Hi Mike!
After a quick look your declarative DSL looks really nice! Thanks a lot for your work on this lib. I think it can be really useful as it covers a lot of canvas constructs and could be used out of the box as a replacement for more imperative approaches. I’m going to use it probably right away :slight_smile:

P.S.
Regarding my canvas rendering lib / “framework” I think that that I’m not able to provide anything generally useful at the moment (I’m going to put a disclaimer into the README). Sorry about that :frowning: I just have to finish and cover my specific application scenario which really cares about svg and image based sprites generation, transformation and caching… Maybe it is possible to extract some pieces from my approach and transfer them to your possible new lib.

2 Likes

Thanks! Would it make sense to split it out as a separate library? It’s a bit odd as part of purescript-audio-behaviors. Perhaps purescript-painting? Or would it be better to make a PR to purescript-drawing as the diff is only around 100 lines of code?

2 Likes