Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QPaintEngineState Class Reference

The QPaintEngineState class provides information about the active paint engine's current state. More...

 #include <QPaintEngineState>

Note: All functions in this class are reentrant.

This class was introduced in Qt 4.1.

Public Functions

QBrush backgroundBrush () const
Qt::BGMode backgroundMode () const
QBrush brush () const
bool brushNeedsResolving () const
QPointF brushOrigin () const
Qt::ClipOperation clipOperation () const
QPainterPath clipPath () const
QRegion clipRegion () const
QPainter::CompositionMode compositionMode () const
QFont font () const
bool isClipEnabled () const
qreal opacity () const
QPainter * painter () const
QPen pen () const
bool penNeedsResolving () const
QPainter::RenderHints renderHints () const
QPaintEngine::DirtyFlags state () const
QTransform transform () const

Detailed Description

The QPaintEngineState class provides information about the active paint engine's current state.

QPaintEngineState records which properties that have changed since the last time the paint engine was updated, as well as their current value.

Which properties that have changed can at any time be retrieved using the state() function. This function returns an instance of the QPaintEngine::DirtyFlags type which stores an OR combination of QPaintEngine::DirtyFlag values. The QPaintEngine::DirtyFlag enum defines whether a property has changed since the last update or not.

If a property is marked with a dirty flag, its current value can be retrieved using the corresponding get function:

Property FlagCurrent Property Value
QPaintEngine::DirtyBackgroundbackgroundBrush()
QPaintEngine::DirtyBackgroundModebackgroundMode()
QPaintEngine::DirtyBrushbrush()
QPaintEngine::DirtyBrushOriginbrushOrigin()
QPaintEngine::DirtyClipRegion or QPaintEngine::DirtyClipPathclipOperation()
QPaintEngine::DirtyClipPathclipPath()
QPaintEngine::DirtyClipRegionclipRegion()
QPaintEngine::DirtyCompositionModecompositionMode()
QPaintEngine::DirtyFontfont()
QPaintEngine::DirtyTransformtransform()
QPaintEngine::DirtyClipEnabledisClipEnabled()
QPaintEngine::DirtyPenpen()
QPaintEngine::DirtyHintsrenderHints()

The QPaintEngineState class also provide the painter() function which returns a pointer to the painter that is currently updating the paint engine.

An instance of this class, representing the current state of the active paint engine, is passed as argument to the QPaintEngine::updateState() function. The only situation in which you will have to use this class directly is when implementing your own paint engine.

See also QPaintEngine.

Member Function Documentation

QBrush QPaintEngineState::backgroundBrush () const

Returns the background brush in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBackground flag.

See also state() and QPaintEngine::updateState().

Qt::BGMode QPaintEngineState::backgroundMode () const

Returns the background mode in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBackgroundMode flag.

See also state() and QPaintEngine::updateState().

QBrush QPaintEngineState::brush () const

Returns the brush in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBrush flag.

See also state() and QPaintEngine::updateState().

bool QPaintEngineState::brushNeedsResolving () const

Returns whether the coordinate of the fill have been specified as bounded by the current rendering operation and have to be resolved (about the currently rendered primitive).

This function was introduced in Qt 4.3.

QPointF QPaintEngineState::brushOrigin () const

Returns the brush origin in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBrushOrigin flag.

See also state() and QPaintEngine::updateState().

Qt::ClipOperation QPaintEngineState::clipOperation () const

Returns the clip operation in the current paint engine state.

This variable should only be used when the state() returns a combination which includes either the QPaintEngine::DirtyClipPath or the QPaintEngine::DirtyClipRegion flag.

See also state() and QPaintEngine::updateState().

QPainterPath QPaintEngineState::clipPath () const

Returns the clip path in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipPath flag.

See also state() and QPaintEngine::updateState().

QRegion QPaintEngineState::clipRegion () const

Returns the clip region in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipRegion flag.

See also state() and QPaintEngine::updateState().

QPainter::CompositionMode QPaintEngineState::compositionMode () const

Returns the composition mode in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyCompositionMode flag.

See also state() and QPaintEngine::updateState().

QFont QPaintEngineState::font () const

Returns the font in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyFont flag.

See also state() and QPaintEngine::updateState().

bool QPaintEngineState::isClipEnabled () const

Returns whether clipping is enabled or not in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipEnabled flag.

See also state() and QPaintEngine::updateState().

qreal QPaintEngineState::opacity () const

Returns the opacity in the current paint engine state.

This function was introduced in Qt 4.2.

QPainter * QPaintEngineState::painter () const

Returns a pointer to the painter currently updating the paint engine.

QPen QPaintEngineState::pen () const

Returns the pen in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyPen flag.

See also state() and QPaintEngine::updateState().

bool QPaintEngineState::penNeedsResolving () const

Returns whether the coordinate of the stroke have been specified as bounded by the current rendering operation and have to be resolved (about the currently rendered primitive).

This function was introduced in Qt 4.3.

QPainter::RenderHints QPaintEngineState::renderHints () const

Returns the render hints in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyHints flag.

See also state() and QPaintEngine::updateState().

QPaintEngine::DirtyFlags QPaintEngineState::state () const

Returns a combination of flags identifying the set of properties that need to be updated when updating the paint engine's state (i.e. during a call to the QPaintEngine::updateState() function).

See also QPaintEngine::updateState().

QTransform QPaintEngineState::transform () const

Returns the matrix in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyTransform flag.

This function was introduced in Qt 4.3.

See also state() and QPaintEngine::updateState().

Publicit�

Best Of

Actualit�s les plus lues

Semaine
Mois
Ann�e
  1. Microsoft ouvre aux autres compilateurs C++ AMP, la sp�cification pour la conception d'applications parall�les C++ utilisant le GPU 22
  2. Les d�veloppeurs ignorent-ils trop les failles d�couvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. RIM : � 13 % des d�veloppeurs ont gagn� plus de 100 000 $ sur l'AppWord �, Qt et open-source au menu du BlackBerry DevCon Europe 0
  4. � Quelque chose ne va vraiment pas avec les d�veloppeurs "modernes" �, un d�veloppeur � "l'ancienne" critique la multiplication des biblioth�ques 12
  5. BlackBerry 10 : premi�res images du prochain OS de RIM qui devrait int�grer des widgets et des tuiles inspir�es de Windows Phone 0
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil d�claratif et extensible pour la compilation de projets Qt 17
  7. Quelles nouveaut�s de C++11 Visual C++ doit-il rapidement int�grer ? Donnez-nous votre avis 10
Page suivante

Le Qt Developer Network au hasard

Logo

Compiler l'add-in Qt de Visual Studio

Le Qt Developer Network est un r�seau de d�veloppeurs Qt anglophone, o� ils peuvent partager leur exp�rience sur le framework. Lire l'article.

Communaut�

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la r�daction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 4.7
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 !
 
 
 
 
Partenaires

H�bergement Web