I’m pretty sure this is impossible, but worth asking I guess.
I have a component which has a border that gets brighter/dimmer depending on a certain buffers RMS.
So … it clearly needs to repaint often since the buffer is constantly changing audio.
It would be cool if I could somehow repaint the border of this component, but not repaint the interior of the component or any of the children …
Is there some way to do that ?
Hmm…the first thing that comes to mind is you could implement it using 4 separate rectangular components to create a hollow frame.
Or, alternatively, instead of calling repaint() for the entire component, you could just signal that only the border needs painting, using this function
void Component::repaint (int x, int y, int width, int height);
Juce is clever enough that it will not force a redraw of Components that don’t intersect the dirty rectangles that require update.
Ah good.
Yeah, I thought about that, but assumed it would “and” together the frame pieces and come up with a bounding box around all of it. Maybe not though, should give it a quick try.
Thanks for the thoughts.
Nope, search for RectangleList in LowLevelGraphicsSoftwareRenderer and your platform specific Windowing file.