PtOSContainer
Offscreen-context container for flicker-free drawing
Class hierarchy:
PtWidget → PtBasic → PtContainer → PtOSContainer
For more information, see the diagram of the widget hierarchy.
Public header:
photon/PtOSContainer.h>
Description:
PtOSContainer creates an offscreen context and forces all its children’s draws to be directed to that context. The draw stream is rendered into offscreen video memory, taking advantage of any hardware-acceleration features supported by the graphics driver. The graphics hardware can then blit the image directly onto the screen, resulting in flicker-free widgets and/or animation.
总结: 对于需要频繁刷新的应用程序, 可以将刷新的窗体 或者是整个 UI程序包含在一个 PtOSContainer 中, 避免出现闪烁的现象。