Sharpie/RTikZDevice — Issue #46: Don't emit any draw commands for fully transparent fill
Author: zackw
Created: 2011-12-04 21:08:46+00:00
State: open

With the default bg="transparent", we get this at the beginning of every tikzDevice picture:

\fill[color=fillColor,fill opacity=0.00,] (0,0) rectangle (width, height);

This command's only effect is to bulk up the generated PDF. It should not be emitted at all. In general, `\fill[...,fill opacity=0,...]` should never be generated. A closely related phenomenon is

\draw[fill=fillColor, draw opacity=0.00,] ... ;

which should be optimized to

\fill[color=fillColor] ...;

(And even these are only special cases of the larger observation that `* opacity=0` and `* opacity=1` should *never* appear in the generated drawing.)