Open pixelpapercraft opened 3 years ago
getImagePixelColor()
and getCanvasPixelColor()
- like getTexturePixelColor
but for images and the generator canvas, respectively. Since for folds lines to be drawn the textures need to be drawn to the canvas, we need to be able to get the pixel colors there.
drawPixel()
- draws a pixel of a certain color directly onto the canvas. This allows for drawing the fold lines without using a more costly image or texture. If not immediately difficult, methods for drawing simple shapes like rectangles, straight lines or circles might also prove useful.
fillTransparentWithWhite()
- fills any pixels on the canvas that aren't fully opaque with white. Since the algorithm will need an object to be surrounded in transparency in order to work, this method will make the design fully opaque in the end.
Thanks @NinjolasNJM, I'll look into these.
From @NinjolasNJM
The ability to do this is crucial for a layer outlining function, making seamless item generators, and several other things. They should be able to read or write a pixel's color and alpha information on a texture or image, directly from the canvas, or from an individual drawn layer.