| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This commit fixes an auto-test failure after fixing QTBUG-8733.
The calculated element bounds should now be much tighter and
respect the width of non-cosmetic pens.
Task-number: QTBUG-8733
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
| |
The vector-effect property is not inherited by default, so it
must be set on each item with a stroke. It is not sufficient
to set it on G nodes.
Task-number: QTBUG-8733
Reviewed-by: Trond
|
|
|
|
| |
Task: QTBUG-8333
|
|
|
|
| |
Reviewed-by: Trust Me
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since a 2D point consists of two coordinates, it was assumed that
polygons and polylines were described with an even number of
coordinates. When the number of coordinates was odd, the program
would read out of bounds and cause an assert failure.
Task-number: QTBUG-6899
Reviewed-by: Gunnar
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 928ee705 introduced a bug which affected paths with
relative offsets.
Task-number: QTBUG-6867
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using math wrapper functions instead direct call. This gives us top-level
control to what (single/double) precision we are effectively using.
Task-number: QTBUG-4894
Reviewed-by: janarve
Reviewed-by: Kim Motoyoshi Kalland
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
Task-number: QTBUG-4587
Reviewed-by: Tor Arne
|
| |
| |
| |
| | |
Reviewed-by: trust me
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
An SVG element can now reference a gradient or solid-color defined
anywhere in the same SVG file.
Task-number: 245602
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
The 'color' attribute is now explicitly parsed for gradient nodes.
Task-number: 260921
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
Task-number: 260920
Reviewed-by: Trustme
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Reviewed-by: Trust Me
|
|/ /
| |
| |
| |
| | |
Task-number: 241223
Reviewed-by: Janne Koskinen
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
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).
|
| | |
|
| |
| |
| |
| |
| | |
Unfortunately, qt_get_hex_rgb() is in QtGui (qcolor_p to be exact).
Hence, we need to duplicate the implementation for QtSvg.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
Loading tiger.svg (tests/benchmarks/qsvgrenderer) enjoys 1% speed-up.
Reviewed-by: Kim
|
| |
| |
| |
| |
| |
| |
| | |
We try to use QStringRef as much as possible. Loading tiger.svg
(tests/benchmarks/qsvgrenderer) enjoys 1.2% speed-up.
Reviewed-by: Kim
|
| |
| |
| |
| | |
Reviewed-by: Kim
|
| |
| |
| |
| | |
Reviewed-by: Kim
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
Reviewed-by: Kim
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
We should use the newly create QStringRef, after all that is the idea
of the optimization.
|
| |
| |
| |
| | |
Reviewed-by: Kim
|
| |
| |
| |
| |
| |
| | |
Use QStringRef operations as much as possible.
Reviewed-by: Kim
|
| |
| |
| |
| | |
Reviewed-by: Kim
|
| |
| |
| |
| | |
Reviewed-by: Kim
|
| |
| |
| |
| | |
Reviewed-by: Kim
|
| |
| |
| |
| | |
Reviewed-by: Kim
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We delay computing the bounding rect as late as possible. This speeds-up
QSvgPath construction.
Reviewed-by: Kim
|