summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstatictext
Commit message (Collapse)AuthorAgeFilesLines
* Fix fallback for QStaticText when it's unsupported in paint engineEskil Abrahamsen Blomfeldt2010-02-191-2/+16
| | | | | | | | When the paint engine does not support QStaticText, we fall back to regular drawText() calls. This fallback would previously paint all text to (0, 0). This fixes the qstatictext autotest on Linux. Reviewed-by: Olivier
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2Jason McDonald2010-02-161-10/+11
|\
| * Rename QStaticText::setUseBackendOptimizations to setPerformanceHint()Eskil Abrahamsen Blomfeldt2010-02-161-10/+11
| | | | | | | | | | | | | | Make the API more general and more readable by using a PerformanceHint enum instead of an on/off-trigger for the OpenGL-specific caching. Reviewed-by: Samuel
* | Fix license headers.Jason McDonald2010-02-161-16/+16
|/ | | | Reviewed-by: Trust Me
* Remove fluxuating tests for QStaticTextEskil Abrahamsen Blomfeldt2010-02-101-209/+0
| | | | | | | The QGLWidget tests would fail at random. The use case has been confirmed to work through manual tests, but I haven't found any good way to test them automatically. They have been removed until time permits.
* Make QStaticText public API againEskil Abrahamsen Blomfeldt2010-02-101-17/+17
| | | | | QStaticText was previously made private API to support inclusion in Qt 4.6.x. This change turns it back into public API for Qt 4.7.0.
* Add tests for using QStaticText with a QGLWidgetEskil Abrahamsen Blomfeldt2010-02-052-1/+212
| | | | Some tests with and without VBO caching.
* Temporarily remove QPainter::drawStaticText() for Qt 4.6.x integrationEskil Abrahamsen Blomfeldt2010-02-051-14/+15
| | | | | | | | | | | We can't add new symbols to QPainter for Qt 4.6.x, as we would not be able to remove them again if we regretted the API. Hence, I've made removable symbols instead, a private global function and a drawStaticText() in QPainterPrivate. In order to tie things together, I needed a static private-getter in QPainterPrivate, and hence it had to be a friend of QPainter. Reviewed-by: Trond
* Fix one test and add tests for backend optimizationsEskil Abrahamsen Blomfeldt2010-02-011-3/+32
| | | | | | The rotatedTranslatedScaled-test would transform the text out of the destination rect, so we'd just confirm two blank images. Also added input to the two basic tests for backend optimizations.
* Make QStaticText private APIEskil Abrahamsen Blomfeldt2010-02-011-1/+1
| | | | | | | | Turns QStaticText into private API in preparation for Qt 4.6.x. The related functions in QPainter are marked as internal in the docs. There are already internal functions in QPainter, so this seemed like a reasonable solution. Since the functions require QStaticText they will not be accessible to anyone who does not include private API.
* Use fallback when drawing projected textEskil Abrahamsen Blomfeldt2010-01-151-0/+29
| | | | | Projected text always has to go via paths, so we use the fall back for this.
* Test current graphics system + initialize memoryEskil Abrahamsen Blomfeldt2010-01-151-23/+44
| | | | | | | Using QImage would only let us test the raster engine. Substitute QPixmap, so we can test different graphics systems. Also initialize the memory in the pixmaps (this was missed because memory is initialized by default in debug builds.)
* Remove translationDoesNotCauseRelayout testEskil Abrahamsen Blomfeldt2010-01-151-45/+0
| | | | | This is more suited to be a benchmark, as it doesn't cover the functionality of the class.
* Add tests for QStaticText::prepare()Eskil Abrahamsen Blomfeldt2010-01-151-0/+51
|
* Remove font property in QStaticText and fix handling translation onEskil Abrahamsen Blomfeldt2010-01-141-4/+15
| | | | | | | | | | | | | painter 1. The font property in QStaticText has been removed. Rather than set a font on the text explicitly, it picks up the font from the painter. If you change the font on the painter, the text layout will have to be updated, like with a matrix. 2. The translation might not be the only transformation on the painter, so rather than translate back to origo, we explicitly set dx and dy on the transform to 0.0 for the duration of the function. 3. Update test to reflect changes
* Ignore rounding errors in QStaticText testEskil Abrahamsen Blomfeldt2010-01-141-11/+4
| | | | | | Combining rotations and translations will cause minor differences between drawText() and drawStaticText(). This is not what the function is testing, so it has been massaged to pass.
* Remove debug outputEskil Abrahamsen Blomfeldt2010-01-141-1/+1
| | | | Don't save images by default.
* Ignore rounding error when painting to rotated painterEskil Abrahamsen Blomfeldt2010-01-141-15/+17
| | | | | | | | There are tiny rounding errors in the matrix rotations which cause tiny differences in drawText() and drawStaticText(). I've chosen to ignore these. Instead of having a threshold on the comparison between the two images, I've chosen to take the easy way out and avoid the problem by not passing in any position for the text.
* Add autotests for transformed static textEskil Abrahamsen Blomfeldt2010-01-141-0/+184
| | | | | Most of these tests currently fail revealing som offset bugs in the painting code.
* Add test for QStaticTextEskil Abrahamsen Blomfeldt2010-01-142-0/+162
Tests that QStaticText rendering is identical to the same operations done with regular QPainter::drawText()