mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +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
8237eea4e9
commit
b1b7a78dd7
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ void GlRenderer::drawPrimitive(GlShape& sdata, const Fill* fill, RenderUpdateFla
|
||||||
16 * sizeof(float),
|
16 * sizeof(float),
|
||||||
});
|
});
|
||||||
|
|
||||||
auto alpha = 1.0f;
|
auto alpha = sdata.opacity / 255.f;
|
||||||
|
|
||||||
if (flag & RenderUpdateFlag::GradientStroke) {
|
if (flag & RenderUpdateFlag::GradientStroke) {
|
||||||
auto strokeWidth = sdata.rshape->strokeWidth();
|
auto strokeWidth = sdata.rshape->strokeWidth();
|
||||||
|
|
Loading…
Add table
Reference in a new issue