canvas-animation: DRY in canvas compositing/lineStyle functions.