summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* qdoc: Moved platform-specific qdoc comments to common .cpp file.Martin Smith2009-05-074-224/+248
| | | | | | | | | When building docs for the mac, qdoc comments for functions defined in the .h file were not found in any of the .cpp files in the mac package because they were in the x11 or windows .cpp file. So I moved them to a .cpp file that is in all the packages. #Task-number: 252496
* Merge branch '4.5' of git@scm.dev.troll.no:qt/qtSimon Hausmann2009-05-067-41/+123
|\ | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac_p.h src/gui/widgets/qmainwindow.cpp
| * Prevented X server crash when calling XFillPolygon with >200000 points.Samuel Rødal2009-05-061-1/+25
| | | | | | | | | | | | | | | | | | Don't know why the X server crashes, but it's reproducible both by us and customers so we should fall back to the raster paint engine to avoid the crash. Task-number: 244362 Reviewed-by: Trond
| * Fixed some inconsistencies for image drawing on non-integer coords.Samuel Rødal2009-05-062-11/+7
| | | | | | | | | | | | | | | | Don't use aliased coordinate delta for image drawing. Related to change fde7475bcf9c10522a8170e6eb8fb9a8fadc21cd. Task-number: 251561 Reviewed-by: Trond
| * Ensured correct rounding of scaled image drawing at non-integer coords.Samuel Rødal2009-05-052-25/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | Images coordinates should simply be rounded and are not to be subject to the aliased coordinate delta. The patch also adds a tiny delta in QSpanData::setupMatrix() to ensure coordinates for fetching from source images are rounded the opposite direction of the target rectangle. This removes a lot of artifacts when trying to do border-image based drawing on non-integer coordinates. A new qps test for border-image drawing is included. Task-number: 251561 Reviewed-by: Trond
| * Fixed bug where 0-opacity would cause images to be drawn fully opaque.Samuel Rødal2009-05-051-1/+1
| | | | | | | | | | | | | | | | | | The bug appears in the raster paint engine and only in release mode as the cause of the bug is in the MMX and SSE blend functions which are disabled in debug. To prevent it simply we return early if we detect that we have an opacity of 0. Reviewed-by: Trond
| * Fix regression in drawing parts of pixmaps on Panther.Norwegian Rock Cat2009-05-051-3/+2
| | | | | | | | | | | | | | | | | | | | The width of a pixmap is NOT the same as the bytes per row. We may have been able to do that in the past, but it doesn't work in the general case. I also took the liberty to introduce a QCFType to automatically handling the free in the general case. Task-number: 252176 Reviewed-by: sroedal
| * Support rotated displays with 15 and 16 bit BGR pixel formats.Paul Olav Tvete2009-05-052-0/+36
| | | | | | | | | | | | | | | | To avoid increasing code size for an uncommon case, the code is #ifdef QT_QWS_ROTATE_BGR Task-number: 250299 Reviewed-by: Tom
* | Merge commit 'origin/4.5'Olivier Goffart2009-05-041-1/+5
|\ \ | |/ | | | | | | Conflicts: src/gui/itemviews/qabstractitemview.cpp
| * Added an assert so that QColormap usage without a QApplication asserts.Trond Kjernaasen2009-05-041-1/+5
| | | | | | | | | | Task-number: 252668 Reviewed-by: Samuel
* | Doc - some cleanups on the documentation of QDrawUtilKavindra Devi Palaraja2009-04-301-24/+30
| |
* | Merge commit 'origin/4.5'Bjoern Erik Nilsen2009-04-292-11/+24
|\ \ | |/
| * QTransform::map(const QRegion&) cut-off for single rect regions.Bjoern Erik Nilsen2009-04-291-0/+4
| | | | | | | | | | | | Avoid QRegion<->QPainterPath conversion if possible. Reviewed-by: Samuel
| * Speed-up QPainter::clipRegion().Bjoern Erik Nilsen2009-04-291-11/+20
| | | | | | | | | | | | | | | | | | We can speed up the calculation by using rect intersections if possible, i.e. QRegion &= QRect instead of QRegion &= QRegion. Then we'll get rid of one QRegion construction and the intersection itself is slightly faster. Reviewed-by: Samuel
* | Compile.Bjoern Erik Nilsen2009-04-291-1/+1
| |
* | Port QStyleSheetStyle to the new qDrawBorderPixmap implementationOlivier Goffart2009-04-291-4/+4
| | | | | | | | | | | | Also add another constructor to QTileRules. Reviewed-by: Jens Bache-Wiig
* | Add qDrawBorderPixmap() function, Qt::TileRules enum, QMargins struct and ↵Marius Bugge Monsen2009-04-292-0/+327
| | | | | | | | | | | | | | | | | | QTileRules struct. Implements a function to allow drawing CSS3-like border-images (also known as nine-grid images). Next step will be to convert the CSS-style code to use this function for drawing border-images. Task-number: none Reviewed-by: jbache
* | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-04-291-0/+3
|\ \ | |/
| * Mac: Fixes a crash in tst_QWidget::updateOnDestroyedSignalBjoern Erik Nilsen2009-04-291-0/+3
| | | | | | | | | | | | | | | | | | | | Addendum to change 9b674ddcea7c0ff7912f185474b7d98bc83bd39f. The problem was that QWidget::paintEngine() (pure virtual) was called while being in the destructor. The use-case itself (see above change) is very very corner case, but still, it shouldn't crash. Reviewed-by: bnilsen
* | Improved performance for pixmaps containing 0-alpha pixels.Samuel Rødal2009-04-291-3/+2
| | | | | | | | | | | | | | Areas of 0-alpha are quite common in ARGB images/pixmaps, so special case them in the argb32 on argb32 image blend function. Reviewed-by: Trond
* | introduce Q_WS_WINCEMaurice Kalinowski2009-04-296-12/+12
| | | | | | | | | | | | | | | | | | | | | | Task-number: 246130 Reviewed-by: joerg Introduce Q_WS_WINCE for Windows CE only windowing parts. So far we decided to stick with Q_WS_WIN32, but having a separate define makes the code more readable. In addition Q_WS_WINCE_WM is available for Windows Mobile only parts, where we do not check for the OS on runtime.
* | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-04-291-1/+3
|\ \ | |/
| * Fixed rendering of bitmap fonts on X11 with Xrender and fontconfig.Trond Kjernåsen2009-04-281-1/+3
| | | | | | | | | | | | | | | | It seems the Xrender PictStandardA1 mask format doesn't work with XLFD bitmap fonts wrapped in a fontconfig structure. Task-number: 252328 Reviewed-by: Samuel
* | Merge branch '4.5' of git@scm.dev.troll.no:qt/qtSimon Hausmann2009-04-271-2/+9
|\ \ | |/
| * Fixes wrong QPaintEvent::region() in QGLWidget::paintEvent.Bjoern Erik Nilsen2009-04-271-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QGLWidget does not support partial updates unless the context is single buffered and auto-fill background is disabled. The problem was that QPaintEvent::region() returned the requested update region without taking into account the limitation of QGLWidget. If QGLWidget doesn't support partial updates, it means everything has to be updated, and QPaintEvent::region() must return the whole widget rect. Auto test included. Task-number: 241785 Reviewed-by: Trond
* | Setting the print dialog to print pdf the QPrinter returns false on isValid()Thomas Zander2009-04-271-5/+9
| | | | | | | | | | | | | | If the user passes QString() on printer name we can still be valid if the format is pdf/postscript. So test that. Reviewed-by: Trond Kjernaasen
* | Merge branch '4.5' of git@scm.dev.troll.no:qt/qtSimon Hausmann2009-04-252-7/+9
|\ \ | |/
| * Sometimes wrong clipping in QWidget::render() when passing a device orBjoern Erik Nilsen2009-04-242-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an untransformed painter When passing a painter to QWidget::render, we use the painter->paintEngine()->systemClip() as the "system viewport", i.e. all painting triggered by render() should be limited to this area. The only way to achieve this is by always ensuring the system clip is clipped to the same area (systemClip &= systemViewport). The problem however, was that we only did this for transformed painters. We must of course always do it when there's a systemViewport set, regardless of whether the painter is transformed or not. Auto test included. Task-number: 248852 Reviewed-by: Trond
* | Merge branch '4.5'Thiago Macieira2009-04-241-0/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts (version number change in 4.5): src/corelib/global/qglobal.h src/qbase.pri tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
| * Fix clipping bug in raster paint engineGunnar Sletta2009-04-241-0/+14
| | | | | | | | | | | | | | | | | | If we have a rect-clip where we actually had spans (used for cleartype) and then reused that clipdata, we would never re-create the spans, which would mean that future drawing would be filtered based on the old clip Reviewed-by: Samuel
* | Remove the Direct3D engine.Gunnar Sletta2009-04-247-5572/+0
| |
* | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-04-234-4/+6
|\ \ | |/ | | | | | | | | | | Conflicts: src/corelib/global/qfeatures.h src/gui/painting/qtransform.cpp util/scripts/make_qfeatures_dot_h
| * Prevent QTransform::type() from returning TxScale instead of TxProject.Samuel Rødal2009-04-221-2/+2
| | | | | | | | | | | | | | | | We have code that assumes that m33 = 1 if the type is TxScale. Instead of changing all that code it's better to just return TxProject as type when m33 is different from 1. Reviewed-by: Simon Hausmann
| * Fix QPrinter::pageRect() for Windows printers, when fullPage() is set.Trond Kjernåsen2009-04-221-1/+1
| | | | | | | | | | | | | | | | | | When QPrinter::fullPage() was set, pageRect() returned the same as paperRect(). Under Windows, there is always a non-printable area that was not taken into account in the fullPage() case. Task-number: 248881 Reviewed-by: Kim
| * Fix Transformed driver on 8-bit displaysPaul Olav Tvete2009-04-222-0/+2
| | | | | | | | | | Task-number: 250971 Reviewed-by: Tom
| * Fix crash in drawPixmap when painting on a null pixmapSamuel Rødal2009-04-221-3/+3
| | | | | | | | | | | | We need to check if the engine is null before we do the thread test. Reviewed-by: Thiago
* | Merge branch '4.5'Rhys Weatherley2009-04-211-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
| * Fix non-opaque text from widget palette being blitted, not blended.Samuel Rødal2009-04-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | QPainter inherits some properties from the widget, among other font and pen. These are set in the painter's state in initFrom(), but in 4.5 we forgot to call QPaintEngineEx::penChanged() to let an extended paint engine know that the pen has changed. This caused the raster engine to believe it could blit non-opaque text, due to the fast_text flag not being correctly updated. Task-number: 251534 Reviewed-by: Paul
* | Merge branch '4.5'Thiago Macieira2009-04-203-170/+119
|\ \ | |/ | | | | | | Conflicts: tests/auto/qaction/tst_qaction.cpp
| * Ifdef out the QWS blend functions for less common bitdephts by defaultGunnar Sletta2009-04-201-45/+45
| | | | | | | | | | | | | | | | ARGB32_PM, RGB32, ARGB8565_PM and RGB16 are optimizied elsewhere and they are the most important formats. The implemenentation of several of these depths are also buggy, so one can question their relevance. Reviewed-by: Samuel
| * Make the 32-bit ARGBPM on 16-bit RGB blend function fasterGunnar Sletta2009-04-201-101/+33
| | | | | | | | | | | | | | The "optimized" version of this function was actually slower by quite a bit, so revert it to the old "trivial" code. Reviewed-by: Samuel
| * Fix drawhelper pixel-writeback when dest has alpha.Gunnar Sletta2009-04-201-1/+1
| | | | | | | | | | | | | | | | The blending always happens in 32-bit premultiplied so the conversion back to dest-format needs to base itself on premlutiplied too. Task-number: 182246 Reviewed-by: Samuel
| * Fix ARGB24PM->RGB16 for i386 GCCGunnar Sletta2009-04-201-20/+1
| | | | | | | | | | | | | | | | | | | | There was special code for gcc to run super-fast, but it was buggy and didn't blend properly. Kill this code for the benefit of the normal blend function. The performance on an Intel Quad Core 2 was not too different from the bytemul approach. Task-number: 246009 Reviewed-by: Trond
| * Fix ARGB8565 onto RGB16 image blending on windowsGunnar Sletta2009-04-201-3/+3
| | | | | | | | | | | | | | The rounding was just wrong... Task-number: 246009 Reviewed-by: Trond
| * Some ifdefs for debugging clipping performanceGunnar Sletta2009-04-201-0/+36
| |
* | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-04-172-28/+39
|\ \ | |/ | | | | | | Conflicts: tests/auto/qpainterpath/tst_qpainterpath.cpp
| * Fix QPrinter::setPrinterName()/QPrinter::printerName() on the Mac.Trond Kjernåsen2009-04-162-28/+39
| | | | | | | | | | | | | | | | | | | | | | | | QPrinter::printerName() used to return the CUPS printer queue name instead of the user-set printer name, which was wrong. In addition, if trying to set the printer name to a non-valid printer, the default printer was still used internally, which is not correct. As sonn as an invalid name is set, the printer now enters an invalid state, which it can only get out of by setting a valid printer name. Task-number: 199271 Reviewed-by: Gunnar
| * Prevent crash in qt_scrollRectInImage.Samuel Rødal2009-04-151-2/+5
| | | | | | | | | | | | | | | | Clip both against the source and target device rectangles. Task-number: 247937 Reviewed-by: Trond BT: yes
* | Make subpixel antialiasing of text work on Mac OS X under carbonGunnar Sletta2009-04-162-5/+15
| | | | | | | | | | | | | | | | | | | | Implement the alphaRGBMapForGlyph function and make use of it in the raster engine. The gamma correction is currently hardcoded to 2.0 which looks very good on two separate displays (iMac and MacBook Pro). Ideally this would be picked from the system settings or computed dynamically, but as long as 2.0 works, we'll stick to that. Reviewed-by: Samuel
* | Prevent crash in qt_scrollRectInImage.Samuel Rødal2009-04-151-2/+5
| | | | | | | | | | | | | | | | Clip both against the source and target device rectangles. Task-number: 247937 Reviewed-by: Trond BT: yes