summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* API review: Rename numCols() -> colorCount()Marius Storm-Olsen2009-11-061-1/+1
| | | | | | | | | The name numCols is ambiguous, as sometimes it's refering to the number of columns, and sometimes the number of colors. It also does not match the typical Qt naming convention *Count(). Reviewed-by: Tom Cooksey Reviewed-by: Andreas Aardal Hanssen
* API review: Rename functions numColors(), setNumColors() and numBytes()Marius Storm-Olsen2009-11-062-2/+3
| | | | | | | | | | QPaintDevice and QImage used the functions numColors(), setNumColors(), and numBytes(). However, this is not consistent with the rest of the Qt API which uses *Count() and set*Count(). Removed all usage of these functions inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
* API review: QMatrix::det() -> QMatrix::determinant(), matching math3dMarius Storm-Olsen2009-11-062-5/+16
| | | | | | | | After an API review of the new math3d classes, the full name was considered better than the short version. Therefore we obsolete the short function, and introduce the longer version. Reviewed-by: Andreas Aardal Hanssen
* Fixed g++ compiler warnings in qpen.cpp.Samuel Rødal2009-11-061-1/+1
|
* Fix QPainter::setPen(pen with color but no style) on non-extended.David Faure2009-11-061-15/+2
| | | | | | | | | | | It was working with a QImage but not with a QPixmap, which is obviously a bug. In addition, it broke WebCore::GraphicsContext::setPlatformStrokeColor which does exactly what I put in the unittest: get pen, set color, set pen. This commit fixes the wrong color in the underline of the links in http://www.davidfaure.fr/kde/link_underline_color.html in QtWebkit. Merge-request: 1995 Reviewed-by: Samuel Rødal <sroedal@trolltech.com>
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-11-061-8/+32
|\
| * Fixed crash in qt_scale_image_16/32bit() when target is flipped.Kim Motoyoshi Kalland2009-11-061-8/+32
| | | | | | | | | | | | | | | | | | If the target rectangle had negative width or height and the target rectangle's border passed through pixel centres, qt_scale_image_16/32bit() could crash because of incorrect rounding. Task-number: 5493 Reviewed-by: Gunnar
* | don't do unessesary brush comparrisonsGunnar Sletta2009-11-061-8/+0
| | | | | | | | Reviewed-by: Samuel
* | Revert micro optimization where NoPen == NoBrush as SVG relies on thisGunnar Sletta2009-11-061-3/+1
|/ | | | Reviewed-by: Samuel
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-062-0/+10
|\
| * Add QT_NO_GRAPHICSEFFECTJørgen Lind2009-11-042-0/+10
| | | | | | | | | | | | | | It depends on QT_NO_GRAPHICSVIEW for now, but it is possible to remove this dependency. Reviewed-by: paul
* | Set strokes as non-convex by default.Gunnar Sletta2009-11-051-0/+4
| | | | | | | | Reviewed-by: Samuel
* | Use fallback stroker for cosmetic strokes with asymetric transformsGunnar Sletta2009-11-051-3/+6
| | | | | | | | Reviewed-by: Samuel
* | Fixed soft-light composition mode in raster and OpenGL1.Kim Motoyoshi Kalland2009-11-051-12/+10
| | | | | | | | | | | | | | | | | | Updated the soft-light composition mode implementation in the raster and OpenGL1 engines to use the equations in the SVG specification as of April 2009. Task-number: QTBUG-3193 Reviewed-by: Trond
* | Fixed some debug and some minor optims to QPaintBuffergunnar2009-11-042-40/+60
| | | | | | | | Reviewed-by: TrustMe
* | Made QPen== catch QPen(Qt::NoPen) == QPen(QBrush(Qt::NoBrush))gunnar2009-11-041-10/+13
| | | | | | | | | | | | | | QSvgDocument uses the latter as default pen so every svg filling command would issue a penChange without this. Reviewed-by: TrustMe
* | Added some helpful info to QBrush and QPen's QDebug operatorsgunnar2009-11-042-2/+34
|/ | | | Reviewed-by: TrustMe
* Fixed QPainterPath::addRoundedRect() for paths with Qt::WindingFill.Kim Motoyoshi Kalland2009-11-031-10/+10
| | | | | | | | | | | QPainterPath::addRoundRect()/addRoundedRect() added the path in counter-clockwise order, while other methods added paths in clockwise order. For Qt::OddEvenFill, the order doesn't matter, but it matters for Qt::WindingFill. Fixed by adding rounded rects in clockwise order like the other shapes. Task-number: QTBUG-1537 Reviewed-by: Trond
* Fixed fillRect on QImage::Format_ARGB32 images.Kim Motoyoshi Kalland2009-11-031-1/+9
| | | | | | | | | | | With composition mode set to QPainter::CompositionMode_Source, the raster paint engine's fillRect function filled images which had non-premultiplied format with premultiplied colours. This was fixed by converting the premultiplied colour back to non-premultiplied before writing to the image. Task-number: QTBUG-5189 Reviewed-by: Trond
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-11-032-6/+5
|\
| * Fixed some compiler warnings.Samuel Rødal2009-11-031-5/+4
| | | | | | | | Reviewed-by: Trond
| * Made QPainter::drawText() respect Qt::TextDontClip flag.Samuel Rødal2009-11-031-1/+1
| | | | | | | | | | | | | | | | The flag was not respected in the vertical direction for any text lines completely outside the bounding rect. Task-number: QTBUG-1666 Reviewed-by: Trond
* | Check for QPixmap::isNull() in QPainter::drawPixmap()Gunnar Sletta2009-11-031-1/+1
| | | | | | | | Reviewed-by: Samuel
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-033-14/+6
|\ \ | |/ |/|
| * Merge commit 'origin/4.6' into featureJørgen Lind2009-11-029-69/+121
| |\
| | * Merge commit '8c4edbd04f350294462fd689748de2dd7cc84d47' into 4.6-upstreamBradley T. Hughes2009-10-301-12/+0
| | |\
| | | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6-WM_NULL-drivenBradley T. Hughes2009-10-282-5/+11
| | | |\
| | | * \ Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6-WM_NULL-drivenBradley T. Hughes2009-10-223-9/+7
| | | |\ \
| | | * | | Remove workarounds for Win32 event dispatcher bugsBradley T. Hughes2009-10-201-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes the startstop timer delay in QAbstractAnimation, and the inSizeMove workaround for paint events. Reviewed-by: Prasanth Ullattil
| | | * | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-198-56/+89
| | | |\ \ \
| | | * | | | Fixed bad glyph rendering under cocoaGunnar Sletta2009-10-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The positioning is still wrong, but now it at least the glyphs are ok Reviewed-by: msorvig
| * | | | | | Fix GRAPHICSVIEWJørgen Lind2009-10-292-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: tom
| * | | | | | Fix LIBRARY and ICONJørgen Lind2009-10-291-0/+2
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | However, compiling with QT_NO_ICON will still not work :( Reviewed-by: tom
* | | | | | Removed usage of CompositionMode_Source in QGraphicsView for X11.Trond Kjernåsen2009-11-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the rendering model in XRender ((src IN mask) OP dest) we can't support the PorterDuff composition modes natively under X11. They just behave differently than what we've defined them to do in QPainter, and there is no apparent workaround. Task-number: QTBUG-4829 Reviewed-by: Gunnar
* | | | | | Fixed holes in thick strokes.Kim Motoyoshi Kalland2009-11-021-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When stroking small paths with a thick pen, it looked like the winding fill rule was ignored. The bug was in the stroke generator which generated paths where the winding number could incorrectly become zero. Task-number: QTBUG-1537 Reviewed-by: Gunnar
* | | | | | Check for null pixmapGunnar Sletta2009-11-021-2/+4
| |/ / / / |/| | | | | | | | | | | | | | Reviewed-by: Trond
* | | | | Fix raster paintengine handling with invalid imagesChristoph Feck2009-10-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initTexture() has explicit handling of invalid images, but when calling adjustSpanMethods() the invalid case is not handled for Type == Texture. This caused two types of crashes: * call to 0 address, because sourceFetch[] has 0 pointer for QImage::Format_Invalid (see https://bugs.kde.org/show_bug.cgi?id=176014) * division by zero in tiled blend functions, because of the " % image_size" modulo arithmetic. (see https://bugs.kde.org/show_bug.cgi?id=203231) Merge-request: 1213 Reviewed-by: Samuel Rødal <sroedal@trolltech.com>
* | | | | Fix QtOpenGL linker issue by exporting qt_getClipRectsThorbjørn Lindeijer2009-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is used in qwindowsurface_x11gl.cpp. The problem only showed when building in release mode due to previous use of Q_AUTOTEST_EXPORT. Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
* | | | | Use shared memory images when shared pixmaps are not available.Fredrik Höglund2009-10-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modern graphics drivers tend to disable shared memory pixmaps, since rendering operations often can't be accelerated by the GPU when the pixmap data is pinned in system RAM. Use XShmPutImage() to flush the window surface when this is case, instead of falling back to the slower XPutImage() method. Merge-request: 1684 Reviewed-by: Samuel Rødal <sroedal@trolltech.com>
* | | | | Fixed QPainterPath to properly set the convex hint on QVectorPath'sGunnar Sletta2009-10-272-14/+38
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Samuel
* | | | | Reworked QVectorPath API to allow for caching and convex curved shapesGunnar Sletta2009-10-275-40/+72
| | | | |
* | | | | Removed a redundant if() check. Its checked in the containing conditionGunnar Sletta2009-10-271-2/+1
|/ / / / | | | | | | | | | | | | Reviewed-by: Samuel
* | | | Added caching of graphics effect source pixmaps to speed up effects.Samuel Rødal2009-10-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If an effect is applied repeatedly on the same source, just with varying parameters, we can save a lot by caching the source pixmaps. Reviewed-by: Bjørn Erik Nilsen
* | | | Remove whitespace before license header in qbackingstore_p.hEskil Abrahamsen Blomfeldt2009-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This extra whitespace was introduced by mistake in a previous commit. Remove it again. Reviewed-by: Trust me
* | | | Honor graphics system on Mac/Cocoa when exposing and resizing windowEskil Abrahamsen Blomfeldt2009-10-221-6/+7
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When exposing or resizing a previously hidden window on Cocoa, we would go through the CoreGraphicsPaintEngine even when a different graphics system was set. This was because there were two different paths from the windowing system into our paint event. The one going through the virtual drawRect function in QCocoaView did not honor the graphics system. This patch makes sure the backing store is used for these types of events as well. Done with: Gunnar Reviewed-by: MortenS
* | | Properly detect font smoothing setting on Mac OS X in raster engineEskil Abrahamsen Blomfeldt2009-10-212-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would assume font smoothing on the mac was always turned on, giving poor text rendering in the cases where it was not. This implementation mirrors querying the cleartype setting on Windows, checking the setting on application initialization and rendering into an 8 bit cache if it is turned off. Task-number: QTBUG-4881 Reviewed-by: Morten Johan Sørvig
* | | Add a new QX11GLPixmapData which renders to X pixmaps using GLTom Cooksey2009-10-191-0/+1
| |/ |/| | | | | | | Enable it by setting QT_USE_X11GL_PIXMAPS environment variable while using the -graphicssystem opengl
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-196-27/+24
|\ \
| * | qt_paint_device_metric() for fetching metricsRhys Weatherley2009-10-153-8/+7
| |/ | | | | | | | | | | | | | | | | | | Custom window surfaces, graphics systems, and Qt/Embedded screen drivers often need to access QPaintDevice::metric(), but it is protected. Hence the growing number of friends in QWidget and QImage. The qt_paint_device_metric() function provides a more future-proof approach that doesn't require lots of friends. Reviewed-by: Gunnar
| * Second attempt: Fixed a few compiler warnings from QtGui for Symbian.Janne Anttila2009-10-131-1/+1
| | | | | | | | | | | | | | The previous commit 9c6e466dc09813dd4a641b2cf385f35ac99346f5 included some changes which were not meant to be pushed. Reviewed-by: TrustMe