gl_engine: Fix gradient color not correct when shape has opacity

When rendering gradient color, needs to take opacity value into
consider.
This commit is contained in:
RuiwenTang 2024-12-13 15:13:37 +08:00 committed by Mira Grudzinska
parent 9e4037b4db
commit 7031d7fc50

View file

@ -342,7 +342,7 @@ void GlRenderer::drawPrimitive(GlShape& sdata, const Fill* fill, RenderUpdateFla
});
}
float alpha = 1.0f;
auto alpha = sdata.opacity / 255.f;
if (flag & RenderUpdateFlag::GradientStroke) {
float strokeWidth = sdata.rshape->strokeWidth();