API - PtOSContainer

来源:互联网 发布:linux 删除用户组 编辑:程序博客网 时间:2024/06/14 00:31

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 中, 避免出现闪烁的现象。

0 0
原创粉丝点击