Closed EricHanLiu closed 6 years ago
We'll probably use the matrix idea, and construct a new layer consisting of only the pixels from the matrix that represented layer 0 (so all the 0 entries in the matrix), or maybe we need to addPathToLayer
somehow?
Then with this new layer we can just export to Rodan the same way the other layers are exported.
The background layer can! be exported along with the other 3 if the user hasn't erased any of the layer data, so the background layer consists of the resultant pixels that aren't in the 3 default layers (if the user hasn't erased any of the existing pixels in those layers)
Works with eraser! Background layer should now be properly functioning.
Bug: if I'm in layer 2 and I erase something in layer 1 (which doesn't actually erase anything), the background layer will look as if I had actually erased from layer 1. I know why this happens, trying to see if I can specify to only add an eraser path if it actually erased data (ie. if the path was on top of the appropriate layer)
edit: after talking with Ke, apparently this feature (the ability to see if a path is on top of a specific layer data region) is not implemented in pixel. Not sure how to fix this otherwise (at least without changing pixel)
Bug
The above bug has been fixed: export to image data now works and multiple exports no longer break the background layer.
Only issue that remains is the background layer being affected by erasing non-active layers.
Pull request accepted, closing and starting a new issue for the eraser issue.
Currently the Pixel background layer is just the entire image, and we need to add a new layer that is the original image minus the 3 user-added layers. ideas?