diff options
author | Hatem ElKharashy <[email protected]> | 2024-03-28 15:58:50 +0200 |
---|---|---|
committer | Hatem ElKharashy <[email protected]> | 2024-04-18 15:42:40 +0300 |
commit | 5ce8fd73430c86cc0b52f8eaf5dbfc000605b6a0 (patch) | |
tree | 3c96e65750bbbdba59faa9bfad112fbc4133401a /tools/qmlcachegen/qmlcachegen.cpp | |
parent | f1051cb48243ab27a44ec4f30259fa38116c2783 (diff) |
VectorImage: tweak the default pen and fix opacity behavior
There are many changes done in this commit, which either prepare the
generator for features implemented in the future or fix the current
behavior.
The default QPen in the style resolver class is changed to match
the default QPen used by Qt Svg module, because this default pen sets
the CapStyle and JoinStyle. This is going to be important when
implementing those features in VectorImage.
There were also some issues with the opacity for several reasons. The
first one was because "transparent" color was not taken into account.
This is not part of the SVG standard, but the browsers, as well as Qt
Svg, implements it anyway. Although we get the correct color from style
resolver, the currentFillColor function overrides the opacity with the
fillOpacity from the extra states.
Finally, this takes us to the other issue with opacity. The fill and
stroke attributes define an RGB color or a paint server like gradients.
The opacity can be controlled on those using fill-opacity and
stroke-opacity. Those opacities can be applied on gradient as well and
not only on normal colors. This change adds new member variables in the
NodeInfo structs to handle the fillOpacity and strokeOpacity.
Change-Id: I267126aecbab488700f6f7490634341893b21a1c
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Diffstat (limited to 'tools/qmlcachegen/qmlcachegen.cpp')
0 files changed, 0 insertions, 0 deletions