This document discusses techniques for efficient and beautiful graphics in Qt applications. It covers topics like 2D graphics with QPainter, transformations with QTransform, pixel manipulation in QImage, common effects like blurring and colorizing, using physics engines, and optimizing for performance by avoiding slow operations and ensuring code is cache friendly. The goal is to provide ideas and tricks to enhance the visual quality of Qt and KDE applications.
1 of 63
Downloaded 143 times
More Related Content
Efficient Graphics with Qt
1. E cient Graphics with Qt
ARIYA HIDAYAT
ENGINEERING DIRECTOR, SENCHA
1
53. Graphics System
yourapp -graphicssystem raster
native Automatic
raster Pure software rasterizer
x11 Use X11 + its extensions
opengl Use OpenGL (ES) 2
53
54. Widget Attributes
Qt::WA_StaticContents
paint events only for the newly visible part
Qt::WA_OpaquePaintEvent
paints all its pixels when it receives a paint event
Qt::WA_NoSystemBackground
the background is not automatically repainted
54
55. More Widget Attributes
Qt::WA_PaintOnScreen
draw directly onto the screen
might cause flickering!!
Qt::WA_NativeWindow
this widget is native (to the window system)
Qt::WA_DontCreateNativeAncestors
the widget's ancestors are kept non-native
55