summaryrefslogtreecommitdiffstats
path: root/src/svg
Commit message (Collapse)AuthorAgeFilesLines
* Fixed handling of stroke-dashoffset in the SVG module.Kim Motoyoshi Kalland2009-11-091-1/+4
| | | | | | | | | | | When stroke-dashoffset was set on a solid stroke (stroke-dasharray="none"), the path was not painted. QPen::setDashOffset() automatically sets the pen's style to CustomDashLine, so if there is no dash array, nothing is drawn. The fix is to avoid calling QPen::setDashOffset() when the pen is solid. Task-number: QTBUG-5609 Reviewed-by: Tor Arne
* Fixed the SVG paint engine to preserve whitespace when drawing text.Kim Motoyoshi Kalland2009-10-201-0/+1
| | | | | | | | Added xml:space="preserve" to the output text tag. This attribute tells the SVG user agent not to strip away excess whitespace in the text element. Reviewed-by: Trond
* Fixed inheritence of whitespace mode in QtSvg.Kim Motoyoshi Kalland2009-10-051-9/+5
| | | | | Task-number: QTBUG-4587 Reviewed-by: Tor Arne
* Fix warnings on mingwThierry Bastian2009-10-011-0/+2
| | | | Reviewed-by: trust me
* doc: Fixed some qdoc errors.Martin Smith2009-09-151-3/+14
|
* Fixed gradient referencing in SVGs.Kim Motoyoshi Kalland2009-09-149-159/+135
| | | | | | | | An SVG element can now reference a gradient or solid-color defined anywhere in the same SVG file. Task-number: 245602 Reviewed-by: Trond
* Fixed white-space handling in the SVG module.Kim Motoyoshi Kalland2009-09-101-10/+13
| | | | | | | | | When parsing lists, only space characters were treated as white-space. Now, carrige returns, line feeds and tabs are also treated as white- space as described in the SVG Tiny 1.2 specification. Task-number: 260799 Reviewed-by: Tor Arne
* Fixed handling of stop-color="currentColor" in the SVG module.Kim Motoyoshi Kalland2009-09-102-14/+31
| | | | | | | The 'color' attribute is now explicitly parsed for gradient nodes. Task-number: 260921 Reviewed-by: Trond
* Make QGraphicsSvgItem a QGraphicsObject.Alexis Menard2009-09-092-15/+11
| | | | | | | | | | This item was inheriting from QObject and QGraphicsItem so there is no point to not make it a QGraphicsObject. I have added some properties that was specific to this class, i.e. elementId. Reviewed-by: ogoffart Reviewed-by: andreas Reviewed-by: bnilsen
* Fixed text positioning in SVGs when using SVG fonts.Kim Motoyoshi Kalland2009-09-091-1/+1
| | | | | Task-number: 260920 Reviewed-by: Trustme
* Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6Janne Anttila2009-09-0922-88/+88
|\
| * Update license headers again.Jason McDonald2009-09-0922-88/+88
| | | | | | | | Reviewed-by: Trust Me
* | Fixes for compiler warnings reported by RVCTJanne Anttila2009-09-092-22/+9
|/ | | | | Task-number: 241223 Reviewed-by: Janne Koskinen
* Fixed resolving colors of the form "rgb(r,g,b)" in SVGs.Kim Motoyoshi Kalland2009-09-071-10/+13
| | | | | | | | | The bug was introduced by 13bcc92274d52fa6df2d636c78cf6ea457d670aa. Instead of comparing only the beginning of a string with "rgb(", a full string compare was used. I also added some error handling to avoid crashing on noncompliant SVG files. Reviewed-by: Trond
* Unbreak static compile (due to symbol conflicts).Ariya Hidayat2009-09-031-21/+21
| | | | | | | Rename the hex-to-RGB routines to avoid conflicts with the same functions in QtGui. We do not really want to export this function. Beside, we want to clean-up and simplify the case for #rrggbb only (the most common one for SVG).
* fix warnings on mingwThierry Bastian2009-09-021-0/+1
|
* Prospective build fix for SVG parsing.Ariya Hidayat2009-09-021-1/+71
| | | | | Unfortunately, qt_get_hex_rgb() is in QtGui (qcolor_p to be exact). Hence, we need to duplicate the implementation for QtSvg.
* Speed-up id look-up for SVG node.Ariya Hidayat2009-09-021-10/+16
| | | | | | | | | | | | | Since we are iterating all the XML attributes, we find and locate the id while we are inside the loop. Thus, no need to retrieve the id via QXmlStreamAttributes::value(). Also, get rid of someId(QSvgAttributes) function and use the 'id' member variable directly. Loading tiger.svg (tests/benchmarks/qsvgrenderer) enjoys 1.2% speed-up. Reviewed-by: Kim
* Faster SVG color parsing by tackling the #rrggbb color early.Ariya Hidayat2009-09-021-31/+47
| | | | | | | | | | | | | If the color starts with '#', let's parse it ourselves rather than waiting for the (fall-back) QColor-from-QString which even requires us to create a QString out of the QStringRef. All widely used illustration programs output SVG with #rrggbb format to specify the color. Loading tiger.svg (tests/benchmarks/qsvgrenderer) enjoys 2.4% speed-up. Reviewed-by: Kim
* Minor speed-up when parsing SVG color.Ariya Hidayat2009-09-021-20/+34
| | | | | | Loading tiger.svg (tests/benchmarks/qsvgrenderer) enjoys 1% speed-up. Reviewed-by: Kim
* Optimize SVG color decoding.Ariya Hidayat2009-09-021-19/+22
| | | | | | | We try to use QStringRef as much as possible. Loading tiger.svg (tests/benchmarks/qsvgrenderer) enjoys 1.2% speed-up. Reviewed-by: Kim
* Use QStringRef when parsing SVG color opacity.Ariya Hidayat2009-09-021-7/+5
| | | | Reviewed-by: Kim
* Simplify SVG color parsing when the color is opaque.Ariya Hidayat2009-09-021-3/+3
| | | | Reviewed-by: Kim
* Speed-up parsing of SVG path data.Ariya Hidayat2009-09-011-117/+127
| | | | | | | | | | | | | | | | Instead of using operations that shuffle the array of numbers, just use pointer to iterate the numbers. This reduced the amount of memory operations during the parsing. In addition, parse the numbers to QVarLengthArray instead of QVector. This works well because usually a path element is typically followed by a short list of numbers. Loading tiger.svg (tests/benchmarks/qsvgrenderer) is now 8% faster, mostly due to the time spent in parsePathDataFast is reduced from 26.1 millions instructions to just 20.5 millions (27% speed-up). Reviewed-by: Kim
* Use QStringRef when parsing SVG transformation matrix.Ariya Hidayat2009-09-011-8/+31
| | | | | | | | There is really no need to use QString for parsing the matrix, hence use QStringRef. In a complex SVG, this cuts significantly the time spent in parseTransform(). Reviewed-by: Kim
* Minor improvement when parsing matrix transformation in SVG.Ariya Hidayat2009-08-311-1/+24
| | | | | | | Create a specialized version of numbers parsing that works on a short QVarLengthArray since a transformation matrix has at most 6 elements. Reviewed-by: Kim
* Speed-up floating-point decoding for SVG parsing.Ariya Hidayat2009-08-311-4/+11
| | | | | | | | | | | | Instead of comparing the character to '0' and '9', use bit fiddling to detect that the character is a digit between '0' and '9'. Loading tiger.svg (tests/benchmarks/qsvgrenderer) is now 10% faster, going down from 85.3 millions instructions to 77.2 millions. Mostly this is due 46% speed-up in parseNumbersList() function, from 26.9 millions instructions to just 18.4 millions. Reviewed-by: Kim
* Faster cut-off when SVG "display" attribute is not explicitly set.Ariya Hidayat2009-08-311-2/+3
| | | | Reviewed-by: Kim
* Speed-up parseCoreNode() for SVG parsing.Ariya Hidayat2009-08-311-15/+37
| | | | | | | | Instead of doing an attribute look-up via QXmlAttributes::value(), we just iterate by ourselves. Thus, we need to carry out the iteration and comparison only once, instead of every call to the said value(). Reviewed-by: Kim
* Fix wrong checks in commit fd8ced2f.Ariya Hidayat2009-08-311-16/+16
| | | | | We should use the newly create QStringRef, after all that is the idea of the optimization.
* Faster cut-off when SVG composition op is not explicitly set.Ariya Hidayat2009-08-311-2/+3
| | | | Reviewed-by: Kim
* Speed-up SVG font attributes parsingAriya Hidayat2009-08-311-33/+26
| | | | | | Use QStringRef operations as much as possible. Reviewed-by: Kim
* Group the stroke attributes for 3.5% speed-up in QSvgAttributes.Ariya Hidayat2009-08-311-32/+38
| | | | Reviewed-by: Kim
* Use QStringRef in parseVisibility for SVG parsing.Ariya Hidayat2009-08-311-3/+2
| | | | Reviewed-by: Kim
* Faster cut-off in SVG parsing when there is no explicit opacity.Ariya Hidayat2009-08-311-0/+3
| | | | Reviewed-by: Kim
* Faster cut-off in SVG parsing when there is no transformation.Ariya Hidayat2009-08-311-4/+4
| | | | Reviewed-by: Kim
* Speed-up parsePen() function for SVG parsing.Ariya Hidayat2009-08-311-50/+42
| | | | | | | | | | | Try to use QStringRef as much as possible and defer any QStringRef to QString until it is absolutely necessary. When loading tiger.svg (tests/benchmarks/qsvgrenderer), the time spent in parsePen() goes down from 1.75 millions instructions to just 0.85 millions. Reviewed-by: Kim
* Speed-up parseBrush() function for SVG parsing.Ariya Hidayat2009-08-311-17/+14
| | | | | | | | | | Use QStringRef as much as possible and leave the remaining QStringRef to QString conversion until it is absolutely necessary. When loading tiger.svg (tests/benchmarks/qsvgrenderer), the time spent in parseBrush() goes down from 1.5 millions instructions to 1.2 millions. Reviewed-by: Kim
* Faster attributes iteration in QSvgAttributes constructor.Ariya Hidayat2009-08-311-99/+157
| | | | | | | | | | Use switch/case to give a faster short-cut when comparing strings. Loading tiger.svg (tests/benchmarks/qsvgrenderer) is 3% faster now. This is mostly because QSvgAttributes constructor goes down from 11.04 millions instructions to just 8.54 millions. Reviewed-by: Kim
* Merge branch '4.6' of git:qt/qt into 4.6Thiago Macieira2009-08-312-4/+7
|\
| * Find the cached bounds only when necessary.Ariya Hidayat2009-08-312-4/+7
| | | | | | | | | | | | | | We delay computing the bounding rect as late as possible. This speeds-up QSvgPath construction. Reviewed-by: Kim
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-3122-286/+286
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-3122-286/+286
| | | | | | | | Reviewed-by: Trust Me
* | Preemptively parse the necessary attributes in QSvgAttributes.Ariya Hidayat2009-08-311-57/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, retrieving an attribute value requires a two-stage lookup, first in the XML attributes and (if it is found there) in the CSS attributes. Both look-ups requires a number of iterations and comparisons, which have to be carried out for every value look-up. This patch changes it so that iterations and comparisons need to be done only once, namely at the beginning. This requires us to store several SVG attributes needed by the parsing routine, but since they are just QStringRefs, the increase in the heap usage is really minimal and even not reported by Valgrind's Massif. Also, now we don't need to hold the XML attributes anymore. The loading of tiger.svg (tests/benchmarks/qsvgrenderer) is reduced from 101.2 millions instructions to 96.5. The biggest gain is however obvious from the time spent in QSvgAttributes::parseStyle(QSvgNode*, QSvgAttributes, QSvgHandler*) which goes down from 16.7 millions instructions to 6.9 millions, i.e. 2.4x faster. Even with the new extra overhead in the QSvgAttributes constructor, QSvgAttributes::parseStyle(QSvgNode*, QXmlStreamAttributes, QSvgHandler*) goes down from 23.5 millions instructions to 18.4 millions, i.e. 1.3x faster. Reviewed-by: Kim
* | No need for the namespaced version in QSvgAttributes::value().Ariya Hidayat2009-08-311-18/+3
| | | | | | | | | | | | | | We do not really use this function with proper namespace URI, so let us get rid of the function. Reviewed-by: Kim
* | Fixed compilation on AIX.Kim Motoyoshi Kalland2009-08-271-2/+2
| | | | | | | | Reviewed-by: Trond
* | Fix the default painter state in QSvgTinyDocument::drawOlivier Goffart2009-08-251-1/+3
| | | | | | | | | | | | Fix the eyes border in plasma Author: Kim
* | Fix taskbar in plasmaOlivier Goffart2009-08-252-0/+7
| | | | | | | | Author: Kim
* | Added missing variable initialization in QSvgStrokeStyle ctor.Kim Motoyoshi Kalland2009-08-252-5/+7
| | | | | | | | | | | | | | The bug this commit fixes was introduced by commit 28ac217b04abaa4d226e43e402c14a88539fca3b. Reviewed-by: Trond
* | Merge branch '4.6'Thiago Macieira2009-08-241-12/+9
|\ \