summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to Digia4.5Sergio Ahumada2012-11-28153-2756/+2756
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I9f5c8a9135271161e2bce50bc413ea01a08c3a76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed searching and copy/paste from PDF documents.axis2009-12-081-1/+1
| | | | | | | | | | | | | Previously copy and paste from PDFs made by Qt would paste garbage into the target document, and searching was not possible. The bug happened because the internal buffer would open its data stream in truncate mode rather than append mode, thereby losing content, and producing a slightly corrupted PDF. Task: QTBUG-4912 Task: QTBUG-3661 RevBy: Trond Kjernåsen (cherry picked from commit f7ee0c9efcb6cb36a95f49bc998524e25480f8ba)
* Fixed a crash in the GL engine when trying to draw invalid pixmaps.Trond Kjernåsen2009-11-261-1/+1
| | | | | Task-number: QTBUG-6226 Reviewed-by: Eskil
* Cocoa: Fix build cocoa port with namespaceRichard Moe Gustavsen2009-09-282-2/+3
| | | | | | This fix just fixes up coding bugs here and there Reviewed-by: Brad
* Fixed clipping of non-cosmetic dashed strokes in raster paint engine.Kim Motoyoshi Kalland2009-09-231-9/+1
| | | | Reviewed-by: Samuel
* Fix crash or painting error when drawing dashed lines with penWidth > 1Eskil Abrahamsen Blomfeldt2009-09-172-2/+4
| | | | | | | | | | | | | Since the width is multiplied into the dash, it needs to be divided out, otherwise you can get a dashOffset which is greater than the pattern at the index, and the dash can become negative. This will in turn lead to passing a negative width to the rasterizer, which at some point will get cast to an unsigned int and overflow. Depending on the position of the line and size of the buffer, this will either crash or produce garbled output. Task-number: QT-4444 Reviewed-by: Samuel
* Fix drawing text in QPicture and printing in right-to-left modeEskil Abrahamsen Blomfeldt2009-09-151-1/+5
| | | | | | | | | | | Change 979d1d3bbc0c68789edbe93f03464d41d7a8469a requires qt_format_text() to honor the Qt::TextForceLeftToRight flag. Without this, the text will be laid out RTL twice, and the output will be broken. Since printing is done through QPicture, this fixes printing when the UI is reversed. Task-number: 261033 Reviewed-by: Trond
* Avoid garbled output on Windows for non-ascii-compatible textEskil Abrahamsen Blomfeldt2009-09-091-5/+5
| | | | | | | | | | | | | In the Windows print engine, we try to send a text item as a raw string of characters to the printer driver if this is possible. This is to facilitate using PDF-printers as much as possible, allowing them to save the text in the document so for searching etc. We can only safely do this if all the characters in the string are ASCII-compatible, i.e. in the 7 bit range, since this is the only part of the set which is guaranteed to be compatible across code pages. Task-number: 180655 Reviewed-by: Trond
* Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5Jason McDonald2009-09-081-7/+7
|\
| * Fixed bug in drawImage() when fall-back code path is used.Samuel Rødal2009-09-081-7/+7
| | | | | | | | | | | | | | | | We need to floor instead of round to prevent rectangles that are on the edge from being shifted one pixel down / right. Task-number: 258776 Reviewed-by: Kim
* | Update license headers again.Jason McDonald2009-09-08153-612/+612
|/ | | | Reviewed-by: Trust Me
* Fixed clipping of native style elements when raster is used on macGunnar Sletta2009-09-041-2/+6
| | | | Reviewed-by: Trond
* Add missing license headersJason McDonald2009-09-031-0/+3
| | | | Reviewed-by: Trust Me
* Add license header to perl scripts.Jason McDonald2009-09-021-0/+40
| | | | Reviewed-by: Trust Me
* Invalidate cached QVectorPath when QPainterPath changesGunnar Sletta2009-08-311-0/+2
| | | | Reviewed-by: Samuel
* Update tech preview license header.Jason McDonald2009-08-31152-1976/+1976
| | | | Reviewed-by: Trust Me
* Fixed rounding error in fillRect() in the raster paint engineEskil Abrahamsen Blomfeldt2009-08-181-11/+7
| | | | | | | | | | | Problem introduced by 7661126bc86ed105c02fd9b084ac5a91f12f10c4, which introduced always rounding up when converting the rectangle's coordinates to integers. This would e.g. cause off-by-one errors for the cursor in QTextDocument. Some code paths depended on the ceiling of the coordinates, and these have been reverted. Task-number: 257914 Reviewed-by: Samuel
* Update license headers.Jason McDonald2009-08-11152-152/+152
| | | | Reviewed-by: Trust Me
* Preserved fill rule for perspective mapped strokes in raster engine.Samuel Rødal2009-08-032-0/+3
| | | | | Task-number: 254407 Reviewed-by: Gunnar
* Fixed drawImage() so that it doesn't sample outside the source image.Kim Motoyoshi Kalland2009-07-281-4/+4
| | | | | | | | | | | | | | | | In qt_scale_image_16bit() and qt_scale_image_32bit(), when a sample point was located on the border between two pixels in the source image, the sample point was rounded up instead of down. If a sample point was exactly on the bottom or right edge of the source image, the function would therefore sample a pixel outside the image. Because of how the target rectangle is rounded, a sample point will never be exactly on the top or left edge of the source image, so we will not get a similar problem there. I extended the lance test pixmap_scaling.qps. Task-number: 258533 Reviewed-by: Samuel
* Don't use layered windows for non-translucent windowsGunnar Sletta2009-07-281-2/+2
| | | | Reviewed-by: Samuel
* Fixed crash when vectorpath was polygonal only in raster::stroke()Gunnar Sletta2009-07-241-9/+16
| | | | | | | Polygonal vector paths may have types==null, in which case this would have crashed. Reviewed-by: Eskil
* QPainter::stroke() on raster engine would draw moveto's as linesGunnar Sletta2009-07-231-5/+17
| | | | | | | | | The reason being that there was an assumption that any non-curved path was a continous polyline. For paths with multiple subpaths in it we need to split this up into multiple strokePolygonCosmetic calls. Task-number: 257621 Reviewed-by: Kim Motoyoshi Kalland
* Diagonal dashes are moving when touching the clip boundary.Gunnar Sletta2009-07-231-1/+4
| | | | | | | | | We normally pad the clip rect with the size of the pen and miterlimit to avoid this, but this didn't handle the case where there was a long diagonal dash. We also need to multiply the padding with the longest dash. Reviewed-By: Tom Cooksey
* Implement clipping in the QPaintEngineEx::stroke() function.Gunnar Sletta2009-07-233-6/+11
| | | | | | | This is a huge impact on performance whenever this path is taken. Reviewed-By: Tom Cooksey
* Fix table borders in multiline tables when printing to PostScript.Gunnar Sletta2009-07-221-2/+7
| | | | | | | | | | | | | I'm not all to happy with this fix, but its the best that one can acheive given the current design. The problem is that QPdfBaseEngine sets a number of states as part of updateState(), but only when we are playing back through the alpha engine. These states are used in some draw functions, also when we are recording in the alpha engine. This leads to the states and their checks being out of sync. So to follow the existing pattern in the code we need to not touch d-> vars prior to a check to usesAlphaEngine. Reviewed-By: Eskil
* Fix deadlock in the QWS server when destroying lots of windowsTom Cooksey2009-07-171-1/+2
| | | | | | | | | | | | | | | | | | | First, don't call QWSWindowSurface::winId() in the destructor, as it will actually request a new id if there isn't already one around - which is a bit silly and highlighted the "real" bug. Second, make sure QWSDisplay::Data::takeId() asks for 1 new id before waiting for more ids to arrive. This is because waitForCreation() calls QWSServer::processEventQueue(). If the events in the queue cause takeId() to be called, QWSDisplay::Data::takeId() gets called recursively. Even though there will be a create 15 ids command in the queue, that will only allow 15 QWSDisplay::Data::takeId() calls to return. The 16th call to QWSDisplay::Data::takeId() on the stack will not be able to return because all the IDs have been taken and (because it has been called recursively) no new create id commands have been generated. So the 16th call to takeId() spins in waitForCreate(). Reviewed-by: Paul
* Fix crash/artifacts on SuperHTom Cooksey2009-06-291-3/+3
| | | | | | | | | | | Add SuperH to the ever growing list of architectures which can't correctly dereference a short* which is not 16-bit aligned. Turning this into a white-list rather than a black list might make sense at some point, but as QT_ARCH_I386 isn't defined on windows, the white list looks even uglier at the moment. :-) Task-number: 257077 Reviewed-by: TrustMe
* Fixed cap and join styles when printing to native Windows printers.Trond Kjernaasen2009-06-261-1/+19
| | | | | | | | Line and polygon strokes did not respect the join/cap styles set on a painter. Task-number: 256914 Reviewed-by: Samuel
* Added QPen warning when setting dash pattern with non-positive entries.Samuel Rødal2009-06-231-2/+2
| | | | | Task-number: 256720 Reviewed-by: Trond
* Moving a child widget right after show() does not work as expected.Bjørn Erik Nilsen2009-06-221-1/+4
| | | | | | | | | | | | | | The problem was that we did an accelerated move, i.e. scrolled the widget's contents in the backing store and repainted the old area. We cannot do this trick when the widget has been invalidated (show(), resize()). In this case the widget had never been painted, so we basically scrolled the content of its parent and the widget itself appeared as invisible. Auto-test included. Task-number: 255117 Reviewed-by: Paul
* Fixed wrong painting when doing IntersectClip after setClipping(false).Samuel Rødal2009-06-222-11/+14
| | | | | | | | | | The documentation is a bit ambiguous on what the expected behavior here is, but the behavior was consistent across paint engines before 4.5. QPaintEngineEx introduced inconsistencies in the raster and OpenGL paint engines, so this patch reverts the behavior back to what it was in 4.4. Task-number: 256549 Reviewed-by: Trond
* Fixed bugs in QPainterPath::united().Samuel Rødal2009-06-171-27/+42
| | | | | | | | | | Change from a relative to an absolute fuzzy compare as was the case pre-4.4. With a relative fuzzy compare points that have an x or y coordinate of 0 will never be merged with points that are very close to 0, for example (1e-15, 0). Task-number: 251909 Reviewed-by: Trond
* Fixed segmentation fault caused by empty clip.Samuel Rødal2009-06-172-2/+2
| | | | | | | | Make sure not to use the broken QRect constructor, and do an early check on whether the clip rect is empty in QRasterizer::rasterizeLine(). Task-number: 254105 Reviewed-by: Trond
* Update license headers as requested by the marketing department.Jason McDonald2009-06-16152-303/+303
| | | | Reviewed-by: Trust Me
* Fixed the pen dash patterns for Mac.Trond Kjernåsen2009-06-111-10/+10
| | | | | | | | The predefined dash patterns for Mac have always been off, compared to the ones in the raster engine and the GL engine. Task-number: 255292 Reviewed-by: Kim
* Initialize xform_scale in constructorAnders Bakken2009-06-091-0/+1
| | | | | | | | Though this variable always will be initialized in QX11PaintEngine::begin() valgrind complains about conditional jump or move depends on uninitialised value(s). Reviewed-by: Donald <qt-info@nokia.com>
* Fixed an issue with graphicssystem raster on 8 and 16 bit X servers.Trond Kjernåsen2009-06-051-1/+1
| | | | | | | | | | We didn't actually check the depth of the target window before calling the qt_x11_drawImage() fu, that will only work with depths >= 24. Task-number: 255311 Reviewed-by: Samuel BT: yes
* Fixed raster bug causing fully clipped images to be partially blended.Samuel Rødal2009-06-031-2/+2
| | | | | | | | | | | The blend functions assume the width / height of the images being blended to be greater than 0. A width of 0 caused the first iteration of a duff's device memcpy (QT_MEMCPY_USHORT) to be executed, thus blending 8 pixels instead of none. BT: yes Task-number: 255014 Reviewed-by: Trond
* Fixed a byte ordering issue when using the raster graphicssystem.Trond Kjernåsen2009-06-021-7/+10
| | | | | | | | The R and B channels were swapped on little endian machines with BGR layout. Task-number: 254934 Reviewed-by: Samuel
* Use a QVarLengthArray instead of some hacky self-made containerHarald Fernengel2009-06-021-12/+3
| | | | | | | This won't leak on error case, and will work with arbitrary sizes. Also changed from int to short as instructed by Samuel. Reviewed-by: Samuel <qt-info@nokia.com>
* BT: Fixed GL textdrawing in the Boxes demo.Trond Kjernaasen2009-05-261-2/+6
| | | | | | | | | | | | Reworked the 85f98acaa3a38079071bea711e43c9a86edec1f6 fix, since it broke glyph positioning in the GL engine under Windows. Instead of changing the glyph cache margin, which impacts where the glyph is positioned, we just make the image the glyph is drawn into 4 pixels bigger in width/heigth. The margin in QImageTextureGlyphCache needs to be reworked.. Task-number: 254450 Reviewed-by: Eskil
* Doc: Miscellaneous documentation fixes for Qt 4.5.x and later.David Boddie2009-05-251-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5David Boddie2009-05-253-18/+8
|\
| * qdoc: Added some missing qdoc comments.Martin Smith2009-05-253-10/+8
| | | | | | | | Task-number: 252491
| * qdoc: Added some missing qdoc comments.Martin Smith2009-05-251-0/+6
| | | | | | | | Task-number: 252493
| * Revert "Ignore GCC warning of unsafe floating point comparisons."Ariya Hidayat2009-05-221-14/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 30f7edc0aab629499b74263391ae529ad31b2ff8. There is no way to restore float-equal warning using the pragma trick. This means (as it was mentioned in the said commit log) anyone that includes qtransform.h will be forced to deal with float-equal. Reviewed-by: Samuel Rødal
| * Fix a wrong compiler define (was a typo).Ariya Hidayat2009-05-201-1/+1
| | | | | | | | The typo was in commit 30f7edc0aab629499b74263391ae529ad31b2ff8.
* | Doc: Fixed the paper sizes again.David Boddie2009-05-201-16/+16
|/ | | | | Task-number: 254179 Reviewed-by: Norwegian Rock Cat
* Ignore GCC warning of unsafe floating point comparisons.Ariya Hidayat2009-05-191-0/+14
| | | | | | | | | | | | Due to optimizations, there are few cases where comparing with a constant is needed, e.g. in operator*=. G++ will give us a warning for this. Since we know what we are doing, surpress the warning. The only drawback for this workaround is if somebody includes qtransform.h in his code and disable the float-equal warning since the warning will be activated again. Reviewed-by: Samuel Rødal