Fix for border painting in "quality" mode. Some borders were swallowed. Added an additional parameter to distinguish between painting bitmap with source transparency (bitmapped text and borders) and without (images).