Opaque components and scale factors paint() triggering


#1

I think this is not bug, but not sure what i can do... 

If a opaque component is scaled, it may has inter-pixel boundaries. So if its got repainted, it might also triggers the paint() of the the parent component, which waste a lot of cpu time, when you repaint it often (meters, analyzers)

Possible solutions i not tried yet...

- make a opaque parent component which surrounds the component with 1 pixel

- call repaint (1,1, getWidth()-2, getHeight()-2), instead of repaint() 

Any other tips, any advice would be helpful

 

 

 


#2

Yeah, it's inevitable really. Your idea of having a 1-pixel zone is probably the best one.