Merry Christmas, everyone
I want to work with pixelart graphics when designing and implementing my GUIs, because:
- lower resolution images means more aesthetics for less CPU.
- better workflow from a designer perspective than with svg and stuff.
- it’s just an exciting art style and gives a nice contrast to the current neumorphism trend imo.
Considering that I only use 1 component the solution is easy. Considering it is animated for each frame I draw the states of all my images onto another image that has no bigger size than any of the other images. Then i set juce::Graphics’ resampling quality to low and draw the upscaled result image.
It seems like a very naiive solution though considering that JUCE usually has this intelligent system, where it only repaints the components that need repainting. I would like to use that on my downsampled images, so that the upsampled image has no work left to do.
On the left this image visualizes a component with another component in it, and on the right there is the resulting upsampled window that should be displayed to the user. Considering that every child-component was a custom component they could all have an image to draw the downsampled stuff on before upsampling it. That would already solve my issue so far that it would only repaint the components that need repainting. But it would still mean that all components have their own upsampling stage, which is not very elegant. So another solution would be to refrain from implementing the paint-method of all the sub-components and rather just gather all their images in the main component when it repaints. then we’d only have 1 upsampling stage, but the repainting-only-when-needed-thing wouldn’t work anymore, so it’s a bad solution as well.
I feel like there should be a rather obvious and not too hacky solution for this (one where I don’t have to rewrite half of JUCE) and I just don’t see it yet. Anyone ideas?