pissang edited a comment on pull request #15711: URL: https://github.com/apache/echarts/pull/15711#issuecomment-918718746
@plainheart I did some search on how skia draws the gradient with `OpenGL`. Seems it will use a `256` width texture(bitmap) to cache the gradient pixels when the color stops is complex(more than 16). The size is much smaller than the canvas width. So it can't be pixel-accurate. https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/gpu/gradients/GrGradientShader.cpp;l=29;drc=a9641800e0e8f7a2ea9a5f55f831b632e990a0e0;bpv=1;bpt=1 One way to solve this issue I can think of is to split the gradient into multiples and draw them on a full-width canvas. Then use this canvas as a CanvasPattern. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org