Join Slack
Powered by
For anybody interested in playing with procedurall...
# compose-desktop
k
Kirill Grouchnikov
11/20/2020, 1:32 AM
For anybody interested in playing with procedurally generated textures in Compose Desktop, take a look at
https://github.com/kirill-grouchnikov/mosaic/blob/master/components/src/desktopMain/kotlin/org/pushingpixels/mosaic/utils/NoiseFactory.kt#L61
(generates an int array of pixels, applies a convolution and then converts the int array to a byte array to create a Skija / Skia bitmap out of it). Convolution is over at
https://github.com/kirill-grouchnikov/mosaic/blob/master/components/src/desktopMain/kotlin/org/pushingpixels/mosaic/utils/ConvolutionUtils.kt#L46
and a more complete example of reading pixels from an image, applying a colorization pass and then creating another image out of it at
https://github.com/kirill-grouchnikov/mosaic/blob/master/components/src/desktopMain/kotlin/org/pushingpixels/mosaic/painter/decoration/ImageWrapperDecorationPainter.kt#L164
😮 1
🎉 5
👍 2
Kirill Grouchnikov
11/20/2020, 2:02 PM
Small change in plans - Mosaic is now Aurora over at
https://github.com/kirill-grouchnikov/aurora
Open in Slack
Previous
Next