summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * Revert "Fixed a few compiler warnings from QtGui for Symbian."Janne Anttila2009-10-131-1/+1
| | | | | | | | | | | | Accidentally used git commit -a when should have used only git commit :( This reverts commit 9c6e466dc09813dd4a641b2cf385f35ac99346f5.
| * Fixed a few compiler warnings from QtGui for Symbian.Janne Anttila2009-10-131-1/+1
| | | | | | | | Reviewed-by: TrustMe
| * Fix compilation with xlC 7: you can't forward-declare enums.Thiago Macieira2009-10-091-6/+1
| | | | | | | | "../../include/QtGui/private/../../../src/gui/painting/qpaintengineex_p.h", line 77.10: 1540-0029 (S) The named enumeration is not defined.
| * Doc: Created a snippet to generate the global colors image.David Boddie2009-10-091-12/+15
| | | | | | | | Reviewed-by: Trust Me
* | Fixed a crash in tst_qpainter on SPARC w/gcc.Trond Kjernåsen2009-10-161-2/+2
| | | | | | | | | | | | | | | | This test works with the native Sun compiler for some reason, and the problem is an unaligned read of 16 bits, which is a problem on several other architectures. Reviewed-by: Kim
* | Fixed QPainter::begin() so that it fails gracefully.Kim Motoyoshi Kalland2009-10-151-29/+32
| | | | | | | | | | | | | | | | | | | | Fixed QPainter::begin() so that if it fails, it can still be used on other paint devices without causing an assert. Autotest included. I also made begin() fail on images with the QImage::Format_Indexed8 format and added warnings in the documentation since painting on such images is not supported. Reviewed-by: Trond
* | Added explicit qualification of static functions to fix xlC compilation.Samuel Rødal2009-10-151-3/+3
| | | | | | | | | | | | | | | | It seems static inline functions need to be fully qualified when called from inside a template function. Task-number: QTBUG-3368 Reviewed-by: Gunnar Sletta
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-10-142-2/+3
|\ \
| * | Fixed handling of brush origin in the OpenGL paint engines.Kim Motoyoshi Kalland2009-10-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixed the OpenGL paint engines so that the brush origin is applied correctly and for all brushes just like in the raster paint engine. Task-number: QTBUG-2676 Reviewed-by: Trond
| * | Fixed bug where bitmaps were painted black instead of in pen colour.Kim Motoyoshi Kalland2009-10-131-0/+2
| |/ | | | | | | | | | | | | | | penData and the pen painter state were not in sync when drawing bitmaps in the raster paint engine. Adding calls to ensurePen() fixed the bug. Task-number: QTBUG-4210 Reviewed-by: Trond
* | Make QStrokerOps, QStroker and QDashStroker properly modulargunnar2009-10-131-4/+4
| |
* | Make QStrokerOps, QStroker and QDashStroker properly modulargunnar2009-10-132-8/+38
|/
* Made QPen::setDashOffset() work with non-custom dashed lines.Kim Motoyoshi Kalland2009-10-091-3/+11
| | | | | Task-number: QTBUG-2738 Reviewed-by: Trond
* Fixed a crash bug on S60 SDK 3.1.axis2009-10-071-1/+4
| | | | | | | | | | | | The crash was caused by the image data not being locked before being accessed. Also avoided an unnecessary detach copy by making the image variable a reference. RevBy: Jani Hautakangas Task: QTBUG-4705 AutoTest: QWidget passed
* Fixing warnings on GCC... (I)João Abecasis2009-10-071-2/+2
| | | | | | | ... by establishing a default behaviour for the switch statements that follow. Reviewed-by: Kim
* Fixing some GCC warningsJoão Abecasis2009-10-071-1/+1
| | | | Reviewed-by: Markus Goetz
* Fixed some projective transform rendering bugs on qreal=float platforms.Samuel Rødal2009-10-061-1/+1
| | | | | | | We should set the near clip slightly higher when qreal is float to avoid numerical precision problems. Reviewed-by: Trond