simulton / QSchematic

A library that allows creating diagrams such as flowcharts or even proper engineering schematics within a Qt application.
https://simulton.com
MIT License
231 stars 60 forks source link

Background: Use exposed rect in paint() #70

Closed Tectu closed 4 months ago

Tectu commented 4 months ago

Background::pain() can (and should) use the QStyleOptionGraphicsItem::exposedRect information to only paint what is actually visible (exposed) on the view port. This will drastically improve rendering performance, especially for large scenes.