summaryrefslogtreecommitdiffstats
path: root/src/svg/qsvgnode_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Skip rendering filters with unsupported primitivesHatem ElKharashy2024-05-061-1/+2
| | | | | | | | | | | | | | | | | In Qt 6.7, <filter> and some of the filter primitives were supported. However, this caused a regression in behavior because Qt Svg used to skip filters altogether, but starting from Qt 6.7, the filter and the filter primitives are parsed and the unsupported filter primitives are skipped which leads to unexpected output. It is a good idea to start supporting the rest of the filter primitives in the future, but for now the renderer will skip applying the filter if it has an unsupported filter primitive. Fixes: QTBUG-123994 Pick-to: 6.7 Change-Id: I14b91c919ace8a886ee285ff1ed466110d13322a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Enable <use> elements in <mask> and propagate state to mask childrenMatthias Rauter2024-03-151-0/+3
| | | | | | | | | | | | | | The use node could not be created within a mask due to a missing entry in a switch statement. This is corrected with this patch. The mask element was implemented such that states do not propagate to it's children. This is not correct and states are propagated correctly with this patch. Pick-to: 6.7 6.7.0 Fixes: QTBUG-123010 Change-Id: I4aab070c73b2e8a9bd0c642c70ea5b28eaef3416 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove the use of Q_SVG_PRIVATE_EXPORTAlexey Edelev2023-12-221-1/+1
| | | | | | Task-number: QTBUG-117983 Change-Id: I44ae75bdd91e84dcca95e3a69e969978fcf42241 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add filter attribute/element and various filter primitivesMatthias Rauter2023-12-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | The primitive filters that can be used to build <filter> are: * feMerge * feColorMatrix * feGaussianBlur * feOffset * feComposite * feFlood [ChangeLog] Added support for the <filter> element to QtSvg. The most important but not all filter primitves are supported: feMerge, feColorMatrix, feGaussianBlur, feOffset, feComposite, feFlood. Task-number: QTBUG-115223 Task-number: QTBUG-115541 Task-number: QTBUG-115548 Task-number: QTBUG-115549 Task-number: QTBUG-115550 Task-number: QTBUG-115551 Change-Id: I01ab0477cc5fe13dd03a094fc21028c182b62f5e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Refactor QSvgFillStyleProperty for Pattern workHatem ElKharashy2023-11-271-1/+1
| | | | | | | Change-Id: I08f72294e1be707b24ca9a0358558bde87ddabea Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
* Add symbol and marker to QSvgMatthias Rauter2023-11-231-0/+18
| | | | | | | | | | | | | | | The QSvgHandler can now parse the symbol and marker element and the marker-start, marker-mid and marker-end attributes of paths, polygons, polylines and lines. [ChangeLog] Added <symbol> and <marker> to the supported elements of QtSvg. Task-number: QTBUG-115223 Task-number: QTBUG-115545 Task-number: QTBUG-115546 Change-Id: I1a615e9977bd8ddd19d7711651a0988c0f41f83f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add mask element and mask attribute to QSvgMatthias Rauter2023-11-201-0/+10
| | | | | | | | | | | | The QSvgHandler can now parse the mask element and the mask attribute of all other elements. If a mask is set on an element, the rendering is redirected into a buffer and the mask is applied to this buffer before it is drawn onto the canvas. Task-number: QTBUG-115223 Task-number: QTBUG-115543 Change-Id: I14b2966f7b9ee2717c8f29f9090f986c2a968c3a Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Refactor QSvgNode draw architectureMatthias Rauter2023-11-031-34/+38
| | | | | | | | | | | | | In preparation for the mask and filter tag, the draw infrastructure is changed from a C-style macro to virtual member functions. Commonalities between all nodes are encapsulated in the draw() function. The actual draw command is encapsulated in the drawCommand() function that is called by the draw function along with some common code for setting styles, masking, filtering and benchmarking. Change-Id: I19aa79be9500eff6faa6b6f12fd13d6c0fe2d0ad Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Private API for iterating over QSvgTinyDocumentPaul Olav Tvete2023-10-301-0/+1
| | | | | | | | | | | Expose more node information in the internal API. Also use the new API to implement a debug operator for QSvgTinyDocument. Includes a drive-by fix: use floating point instead of int for rounded rect radius. Task-number: QTBUG-116883 Change-Id: I238b7313c10b88abd7c2ca755b898ecb6f8c3e8b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add selectable featureSet to all QSvg classesMatthias Rauter2023-09-201-1/+13
| | | | | | | | | | | In preparation of adding additional svg elements, that go beyond the Tiny 1.2 standard, a member variable and respective getters and setters are added to all relevant classes to let the application developers decide which SVG features they want to be parsed. Task-number: QTBUG-115223 Change-Id: Ia862548de815ca67e3ae8939141dc60f31696bb2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't rasterize gigantic shapesEskil Abrahamsen Blomfeldt2023-04-171-0/+3
| | | | | | | | | | | | | | | We set a limit for the bounding rect of shapes to avoid stalling applications for several minutes while rendering unreasonably large shapes. The limit can be disabled using an environment variable. [ChangeLog][Performance] Unreasonably large shapes are now ignored in SVG files to avoid stalling the application. The check can be disabled by setting QT_SVG_DISABLE_SIZE_LIMIT=1 in the environment. Pick-to: 6.2 6.5 Fixes: QTBUG-111850 Change-Id: Id8154049c96a565aad237ee007da0ee879446448 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-131-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ie5a75414af5fda27f5b5f527f3543b088b674677 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix crash on recursive self-referral in <use> elementEirik Aavitsland2017-11-151-0/+1
| | | | | | | | | | Referring to an ancestor in a <use> element would lead to endless recursion. Add checks to avoid recursion, and also emit a warning while parsing. Task-number: QTBUG-64425 Change-Id: I9ee1b9bfef13796cc3f387ff8579c6b13bc4ae9a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Updated license headersJani Heikkinen2016-01-251-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I4bbd8b2a35222b925c6e5cef6337e6237d3e1716 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ie7d37928ebd680c6f1b20045de11abcd5595c73f Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Export private symbols for use from other Qt modulesv5.4.0-rc1v5.4.0Louai Al-Khanji2014-11-181-1/+2
| | | | | Change-Id: I74aa76cb485cb652eba04ff2387165bab9663c99 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Update license headers and add new license filesv5.4.0-alpha1Antti Kokko2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I847adeea20fd98e5c9a18b8c44a15de84283f216 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* remove pointless #ifndef QT_NO_SVGOswald Buddenhagen2013-10-291-3/+0
| | | | | | | the way to disable the feature is to not compile the module. Change-Id: I96f18d037243f7d6e3b3cb2c23922cc4c05c30a8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix module name format in file headersSze Howe Koh2013-01-291-1/+1
| | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Change-Id: I418bbd3817d433a1b82f0f0fea68f2235d2abc5a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: Icf9d15a0f1f38ab60f0dd8fc2bc6ac936dd7dc62 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie28eae89f2ad032f174ff840cc6a44d8dd511eed Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I5f2eda9477944e22ec5f6dd07dcb53feaa9fc03b Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ia89ccb618e630103d60a6e2703e3fbedae0616a6 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | | Change-Id: I2dda86020c6d4b3edf8461733b14a95b9e519afc Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtsvg Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+206
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12