aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickvectorimage/helpers
Commit message (Collapse)AuthorAgeFilesLines
* qml generator: add functionality for animated (morphing) pathsEirik Aavitsland6 days2-0/+181
| | | | | | | | | | | | | | | | | Add a new Path item to the Helpers module: pathInterpolated, that holds a list of paths (specified as svg path texts) and has a settable interpolation factor property. Based on the value factor, the resulting path will be an interpolation between path #n and path#n+1, where n is the integer part of the factor. The fractional part determines the interpolation weight between the two. Replace the static QPainterPath in PathNodeInfo with an animated property holding QPainterPath values. During generation, if the property is found to be animated, a PathInterpolated item is generated instead of a static PathSvg item. Change-Id: Ic061005e135cbde1bd88ab1ac7c9e7840f55c232 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* qml generator: extend masking functionalityEirik Aavitsland2025-11-051-2/+6
| | | | | | | | Add support for alpha and inverted mask modes Task-number: QTBUG-137913 Change-Id: I86a58d860733abee2158788ff74ce36eef42c770 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* VectorImage: Support basic masksEskil Abrahamsen Blomfeldt2025-09-303-0/+140
| | | | | | | | | | | | | | | | This implements support for SVG masks with the default content unit type. The alternative "object bounding box" content unit type is still not supported as it would need additional logic to replicate the mask per masked item. With this change, the parser has to provide a unique ID for each node, so that references to masks can be resolved by the parser. This involves some complexity in the SVG parser to avoid name collisions for use nodes, switch nodes, etc. Task-number: QTBUG-121537 Change-Id: If9f47f364f8682ab6021e7f6277c480c3f075297 Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
* VectorImage: Prepare for separate helpers import for non-svg formatsEirik Aavitsland2025-05-282-104/+0
| | | | | | | | In particular, remove the Layer helper item, which will be added to a qtlottie helpers import instead. Change-Id: I9df98fc5bd983dd13822b62655e65f7f1093f4ca Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* qquicktransformgroup: change transitive include to an explicit oneFabian Kosmale2025-05-221-0/+1
| | | | | Change-Id: I702ddfa549a7fadee423628f576dfff4083448a7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Support replace animationsEskil Abrahamsen Blomfeldt2025-05-192-0/+201
| | | | | | | | | | | | | SVG has a feature where a set of animations on the transform can be set to either replace or append to previous animations, but only while the animation set is active. In order to support this, we introduce a helper class called TransformGroup which can contain a set of parallel animations and have them override the others. Change-Id: I28be7d120527b1f2d1e3dbf5c5de94094c766363 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* VectorImage: Support transform referencesEirik Aavitsland2025-05-162-0/+104
| | | | | | | | | | | | The Lottie file format has a feature where a layer can have the transform of another layer (including any transform set on one of its ancestors) as its base. This means that we need a specialized helper type that collects the transforms of its ancestors and exposes the combination so that it can be referenced from a different part of the generated QML. Change-Id: I20b72cb9b9af2834f40f391ecb8df7bb0c5e1958 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Support fill-opacity and stroke-opacity in VectorImageEskil Abrahamsen Blomfeldt2025-04-302-0/+148
The alpha value of the fill and stroke colors can be animated separately in SVG. In order to support this, we introduce a specialized ColorOpacityAnimation type in a Helpers library which only overwrites the alpha channel of the target property. This requires an extra hook in the animation frame work which allows us to get the current value of the property. It should have minimal impact on any existing code, but may have additional use cases later, when we implement support for additive color animations for instance. Since the interpolator API in QVariantAnimation is public API, we add a secondary, private API for this. If we see use for it in the future, this could mature to a public API as well. Fixes: QTBUG-135322 Change-Id: I803f4e64c41e9d6dc355f2468233661885aa7f15 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>