Fixed a bug with opacity not being applied to painted objects.