mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 04:24:28 +00:00
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:
parent
9e4037b4db
commit
7031d7fc50
1 changed files with 3 additions and 3 deletions
|
@ -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) {
|
if (flag & RenderUpdateFlag::GradientStroke) {
|
||||||
float strokeWidth = sdata.rshape->strokeWidth();
|
float strokeWidth = sdata.rshape->strokeWidth();
|
||||||
|
|
Loading…
Add table
Reference in a new issue