MyTetra Share
Делитесь знаниями!
enum QGraphicsItem::CacheMode
Время создания: 22.09.2017 18:28
Раздел: Python - PyQt4 - Структура классов - QtGui - QGraphicsItem - CacheMode - управление кешем рисунков
Запись: xintrea/mytetra_db_mcold/master/base/1506093604yw0t3ivc0m/text.html на

This enum describes QGraphicsItem's cache modes. Caching is used to speed up rendering by allocating and rendering to an off-screen pixel buffer, which can be reused when the item requires redrawing. For some paint devices, the cache is stored directly in graphics memory, which makes rendering very quick.






The default; all item caching is disabled. QGraphicsItem::paint() is called every time the item needs redrawing.



Caching is enabled for the item's logical (local) coordinate system. QGraphicsItem creates an off-screen pixel buffer with a configurable size / resolution that you can pass to QGraphicsItem::setCacheMode(). Rendering quality will typically degrade, depending on the resolution of the cache and the item transformation. The first time the item is redrawn, it will render itself into the cache, and the cache is then reused for every subsequent expose. The cache is also reused as the item is transformed. To adjust the resolution of the cache, you can call setCacheMode() again.



Caching is enabled at the paint device level, in device coordinates. This mode is for items that can move, but are not rotated, scaled or sheared. If the item is transformed directly or indirectly, the cache will be regenerated automatically. Unlike ItemCoordinateCacheMode, DeviceCoordinateCache always renders at maximum quality.

MyTetra Share v.0.58
Яндекс индекс цитирования