Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
Qt for MCUs 1.9
-
2bcabe5d
-
Platform Sprint 4.5/2021
Description
When drawing a Shape the ShapeNode::render calls blendPath with the opacity of the shapeNode as sourceOpacity parameter (const int sourceOpacity = qRound(opacity * 256)
The VGLiteDrawingEngine calls then VGLite::blendPath function. Inside this function in vglitesupport.cpp opacity is not used anymore. This means that opacity does not apply for the Shape.
Comparing this with similar function of cypress board (cygfxbackend.cpp):
if (fillBrush && fillBrush->pattern() == Qul::PlatformInterface::Brush::SolidPattern)
makes me to believe that the same should be done in vglitesupport.cpp as well.
For example:
if (fillBrush) {
PlatformInterface::Rgba32 fillColor = fillBrush->color();
fillColor.setAlpha(fillColor.alpha() * (sourceOpacity * (1 / 256.f)));
destinationPath->processFillPath();
and similarly for the strokeBrush.