src/gui/painting/qpainter.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 5 d3bac044e0f0
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
  1327     implications for performance, and ensuring that every single
  1327     implications for performance, and ensuring that every single
  1328     operation is fast in combination with all the various combinations
  1328     operation is fast in combination with all the various combinations
  1329     of composition modes, brushes, clipping, transformation, etc, is
  1329     of composition modes, brushes, clipping, transformation, etc, is
  1330     close to an impossible task because of the number of
  1330     close to an impossible task because of the number of
  1331     permutations. As a compromise we have selected a subset of the
  1331     permutations. As a compromise we have selected a subset of the
  1332     QPainter API and backends, were performance is guaranteed to be as
  1332     QPainter API and backends, where performance is guaranteed to be as
  1333     good as we can sensibly get it for the given combination of
  1333     good as we can sensibly get it for the given combination of
  1334     hardware and software.
  1334     hardware and software.
  1335 
  1335 
  1336     The backends we focus on as high-performance engines are:
  1336     The backends we focus on as high-performance engines are:
  1337 
  1337 
  1371     0, 90, 180, 270 degree rotations.
  1371     0, 90, 180, 270 degree rotations.
  1372 
  1372 
  1373     \o \c drawPixmap() in combination with simple transformations and
  1373     \o \c drawPixmap() in combination with simple transformations and
  1374     opacity with non-smooth transformation mode
  1374     opacity with non-smooth transformation mode
  1375     (\c QPainter::SmoothPixmapTransform not enabled as a render hint).
  1375     (\c QPainter::SmoothPixmapTransform not enabled as a render hint).
  1376 
       
  1377     \o Text drawing with regular font sizes with simple
       
  1378     transformations with solid colors using no or 8-bit antialiasing.
       
  1379 
  1376 
  1380     \o Rectangle fills with solid color, two-color linear gradients
  1377     \o Rectangle fills with solid color, two-color linear gradients
  1381     and simple transforms.
  1378     and simple transforms.
  1382 
  1379 
  1383     \o Rectangular clipping with simple transformations and intersect
  1380     \o Rectangular clipping with simple transformations and intersect
  1982 }
  1979 }
  1983 
  1980 
  1984 /*!
  1981 /*!
  1985     \since 4.6
  1982     \since 4.6
  1986 
  1983 
  1987     Flushes the painting pipeline and prepares for the user issuing
  1984     Flushes the painting pipeline and prepares for the user issuing commands
  1988     commands directly to the underlying graphics context. Must be
  1985     directly to the underlying graphics context. Must be followed by a call to
  1989     followed by a call to endNativePainting().
  1986     endNativePainting().
       
  1987 
       
  1988     Note that only the states the underlying paint engine changes will be reset
       
  1989     to their respective default states. If, for example, the OpenGL polygon
       
  1990     mode is changed by the user inside a beginNativePaint()/endNativePainting()
       
  1991     block, it will not be reset to the default state by endNativePainting().
  1990 
  1992 
  1991     Here is an example that shows intermixing of painter commands
  1993     Here is an example that shows intermixing of painter commands
  1992     and raw OpenGL commands:
  1994     and raw OpenGL commands:
  1993 
  1995 
  1994     \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 21
  1996     \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 21
  2008 }
  2010 }
  2009 
  2011 
  2010 /*!
  2012 /*!
  2011     \since 4.6
  2013     \since 4.6
  2012 
  2014 
  2013     Restores the painter after manually issuing native painting commands.
  2015     Restores the painter after manually issuing native painting commands. Lets
  2014     Lets the painter restore any native state that it relies on before
  2016     the painter restore any native state that it relies on before calling any
  2015     calling any other painter commands.
  2017     other painter commands.
  2016 
  2018 
  2017     \sa beginNativePainting()
  2019     \sa beginNativePainting()
  2018 */
  2020 */
  2019 void QPainter::endNativePainting()
  2021 void QPainter::endNativePainting()
  2020 {
  2022 {