QDirectPainter Class ReferenceThe QDirectPainter class provides direct access to the video hardware. More... #include <qdirectpainter_qws.h> Inherits QPainter. Public Members
Detailed DescriptionThe QDirectPainter class provides direct access to the video hardware.
Only available in Qt/Embedded. When the hardware is known and well defined, as is often the case with software for embedded devices, it may be useful to manipulate the underlying video hardware directly. In order to do this in a way that is co-operative with other applications, you must lock the video hardware for exclusive use for a small time while you write to it, and you must know the clipping region which is allocated to a widget. QDirectPainter provides this functionality. In the simplest case, you make a QDirectPainter on a widget and then, observing the clip region, perform some platform-specific operation. For example: void MyWidget::updatePlatformGraphics() { QDirectPainter dp( this ); for ( int i = 0; i < dp.numRects; i++ ) { const QRect& clip = dp.rect(i); ... // platform specific operation } } The platform-specific code has access to the display, but should only modify graphics in the rectangles specified by numRects() and rect(). Note that these rectangles are relative to the entire display. The offset() function returns the position of the widget relative to the entire display, allowing you to offset platform-specific operations appropriately. The xOffset() and yOffset() functions merely return the component values of offset(). For simple frame-buffer hardware, the frameBuffer(), lineStep(), and depth() functions provide basic access, though some hardware configurations are insufficiently specified by such simple parameters. Note that while a QDirectPainter exists, the entire Qt/Embedded window system is locked from use by other applications. Always construct the QDirectPainter as an auto (stack) variable, and be very careful to write robust and stable code within its scope. See also Graphics Classes. Member Function Documentation
Construct a direct painter on w. The display is locked and the
mouse cursor is hidden if it is above w.
|
0 | no rotation |
1 | 90 degrees rotation |
2 | 180 degrees rotation |
3 | 270 degrees rotation |
This file is part of the Qt toolkit. Copyright © 1995-2003 Trolltech. All Rights Reserved.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 3.2 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com