View | Details | Raw Unified | Return to issue 120165
Collapse All | Expand All

(-)vcl/source/gdi/bitmapex.cxx (-4 / +18 lines)
Lines 131-138 Link Here
131
		eTransparent	( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
131
		eTransparent	( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
132
		bAlpha			( sal_False )
132
		bAlpha			( sal_False )
133
{
133
{
134
    DBG_ASSERT( !rMask || rBmp.GetSizePixel() == rMask.GetSizePixel(),
134
    if(!rMask)
135
                "BitmapEx::BitmapEx(): size mismatch for bitmap and mask." );
135
    {
136
        OSL_ENSURE(false, "Empty mask given (!)");
137
    }
138
    else if(rBmp.GetSizePixel() != rMask.GetSizePixel())
139
    {
140
        OSL_ENSURE(false, "Mask size differs from Bitmap size, corrected Mask (!)");
141
        aMask.Scale(rBmp.GetSizePixel());
142
    }
136
143
137
    // #105489# Ensure a mask is exactly one bit deep
144
    // #105489# Ensure a mask is exactly one bit deep
138
    if( !!aMask && aMask.GetBitCount() != 1 )
145
    if( !!aMask && aMask.GetBitCount() != 1 )
Lines 151-158 Link Here
151
		eTransparent	( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
158
		eTransparent	( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
152
		bAlpha			( !rAlphaMask ? sal_False : sal_True )
159
		bAlpha			( !rAlphaMask ? sal_False : sal_True )
153
{
160
{
154
    DBG_ASSERT( !rAlphaMask || rBmp.GetSizePixel() == rAlphaMask.GetSizePixel(),
161
    if(!rAlphaMask)
155
                "BitmapEx::BitmapEx(): size mismatch for bitmap and alpha mask." );
162
    {
163
        OSL_ENSURE(false, "Empty alpha given (!)");
164
    }
165
    else if(rBmp.GetSizePixel() != rAlphaMask.GetSizePixel())
166
    {
167
        OSL_ENSURE(false, "Alpha size differs from Bitmap size, corrected Mask (!)");
168
        aMask.Scale(rBmp.GetSizePixel());
169
    }
156
170
157
    // #i75531# the workaround below can go when
171
    // #i75531# the workaround below can go when
158
    // X11SalGraphics::drawAlphaBitmap()'s render acceleration
172
    // X11SalGraphics::drawAlphaBitmap()'s render acceleration

Return to issue 120165