Fix bugs in Graphics#beginGradientFill