9 Replies Latest reply on Aug 22, 2017 12:14 PM by Davide_Barranca

    How to draw pixel data into a layer from Generator

    andy hall



      How might one draw arbitrary RGBA data into a layer?


      Are there any APIs that do this directly? If not, I'm guessing one could go through the target area, selecting each pixel and then doing a fill operation with the required color - or maybe draw each pixel with the pencil tool, etc. Is there some standard way of doing such things? I'm guessing people must have needed to do this, but I couldn't find any discussion or code samples.


      If the use case isn't clear, I'm calling generator.getPixmap on a layer, then I modify the data and want to draw the results into a different layer. This is via generator, so either generator code or JSX would work (though generator APIs would be a lot easier to work with).