vclprocessor2d.cxx (8ffc68d8) vclprocessor2d.cxx (5496114c)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 395 unchanged lines hidden (view full) ---

404 mpOutputDevice->SetFillColor(Color(aModifiedColor));
405 mpOutputDevice->SetLineColor();
406 mpOutputDevice->DrawPolygon(aPolygon);
407
408 return;
409 }
410 }
411
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 395 unchanged lines hidden (view full) ---

404 mpOutputDevice->SetFillColor(Color(aModifiedColor));
405 mpOutputDevice->SetLineColor();
406 mpOutputDevice->DrawPolygon(aPolygon);
407
408 return;
409 }
410 }
411
412 // decompose matrix to check for shear, rotate and mirroring
413 basegfx::B2DVector aScale, aTranslate;
414 double fRotate, fShearX;
412 // #122923# do no longer add Alpha channel here; the right place to do this is when really
413 // the own transformer is used (see OutputDevice::DrawTransformedBitmapEx).
415
414
416 aLocalTransform.decompose(aScale, aTranslate, fRotate, fShearX);
417
418 const bool bRotated(!basegfx::fTools::equalZero(fRotate));
419 const bool bSheared(!basegfx::fTools::equalZero(fShearX));
420
421 if(!aBitmapEx.IsTransparent() && (bSheared || bRotated))
422 {
423 // parts will be uncovered, extend aBitmapEx with a mask bitmap
424 const Bitmap aContent(aBitmapEx.GetBitmap());
425#if defined(MACOSX)
426 AlphaMask aMaskBmp( aContent.GetSizePixel());
427 aMaskBmp.Erase( 0);
428#else
429 Bitmap aMaskBmp( aContent.GetSizePixel(), 1);
430 aMaskBmp.Erase(Color(COL_BLACK)); // #122758# Initialize to non-transparent
431#endif
432 aBitmapEx = BitmapEx(aContent, aMaskBmp);
433 }
434
435 // draw using OutputDevice'sDrawTransformedBitmapEx
436 mpOutputDevice->DrawTransformedBitmapEx(aLocalTransform, aBitmapEx);
437 }
438
439 void VclProcessor2D::RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate)
440 {
441 const attribute::FillGraphicAttribute& rFillGraphicAttribute(rFillBitmapCandidate.getFillGraphic());
442 bool bPrimitiveAccepted(false);

--- 1091 unchanged lines hidden ---
415 // draw using OutputDevice'sDrawTransformedBitmapEx
416 mpOutputDevice->DrawTransformedBitmapEx(aLocalTransform, aBitmapEx);
417 }
418
419 void VclProcessor2D::RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate)
420 {
421 const attribute::FillGraphicAttribute& rFillGraphicAttribute(rFillBitmapCandidate.getFillGraphic());
422 bool bPrimitiveAccepted(false);

--- 1091 unchanged lines hidden ---