I just did this and found the following, I’ll use your Tracktion example
Have a component that is going to contain the Overview(or whatever the background image is going to be) ie(pseudo code, not tested, just typed in, blah blah blah)
ContainerComponent : public Component
bgComponent->setBounds(0, 0, getWidth(), getHeight());
void ContainerComponent::paintOverChildren(Graphics &g)
// do your main animation here, position line, or whatever
your static background(or the one that doesn’t change very often) would be this
BackgroundComponent : public Component ...
setOpaque(true); // see note below
void BackgroundComponent::paint (Graphics& g)
// do the static painting as per usual
I personally found I needed to setOpaque to be true as it was far too expensive on a faily large component to draw on top of it(JUCE uses a blend pixel function that is quite costly) By setting my background component to opaque, I found I could draw on top of it(with paintOverChildren()) at a rate of about 1 frame a second with about 5% of the CPU versus 25% if it wasn’t opaque
Hope that helps!