Does it impact paint performance if multiple components share the same position and size and all of them are setVisible(true) but of course only the topmost is seen on screen. Will JUCE only renderer the topmost component and not draw any other components at the same position and size that are placed behind it? or will the other components be rendered too but they are just not visible? so it would impact performance?
what i’m trying to do is fading between components.
lets say i got at least 2 components (componentA, componentB) both placed at 0,0,500,500. both visible but only the topmost component is seen.
now i got 2 buttons to switch which one should be visible on front.
i do the following if button A is clicked…
componentA->setAlpha(0.f);
componentA->toFront(true);
Desktop::getInstance().getAnimator().fadeIn(componentA.get(), 200);
and when i click on button B…
componentB->setAlpha(0.f);
componentB->toFront(true);
Desktop::getInstance().getAnimator().fadeIn(componentB.get(), 200);
The transition works fine and looks great! But if the components that are not seen are rendered too i have to change my code because i don’t want to waste performance…
Thanks in advance!
