UNPKG

vega-scenegraph

Version:

Vega scenegraph and renderers.

13 lines (11 loc) 307 B
import color from './color'; export default function(context, item, opacity) { opacity *= (item.fillOpacity==null ? 1 : item.fillOpacity); if (opacity > 0) { context.globalAlpha = opacity; context.fillStyle = color(context, item, item.fill); return true; } else { return false; } }