vcl: remove OutputDevice::DrawBitmapEx()

This also streamlines DrawBitmapWallpaper()

Change-Id: I694667147319ba9d235348068ed8fc811447fae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190898
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Christopher Sherlock
2025-11-11 07:16:00 +01:00
committed by Tomaž Vajngerl
parent 2feb36d92e
commit e3ea978616
80 changed files with 225 additions and 307 deletions
+1 -1
View File
@@ -638,7 +638,7 @@ void MediaWindowImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rec
Point aPoint(aBasePos.X() + ((aVideoRect.GetWidth() - aLogoSize.Width()) >> 1),
aBasePos.Y() + ((aVideoRect.GetHeight() - aLogoSize.Height()) >> 1));
rRenderContext.DrawBitmapEx(aPoint, aLogoSize, *pLogo);
rRenderContext.DrawBitmap(aPoint, aLogoSize, *pLogo);
}
void MediaWindowImpl::GetFocus()
+1 -1
View File
@@ -1159,7 +1159,7 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not wor
aPosOffs.AdjustX(Print::nLeftMargin );
aPosOffs.AdjustY(Print::nTopMargin );
pPrinter->DrawBitmapEx( aPosOffs, aOutputSz, aDlg );
pPrinter->DrawBitmap( aPosOffs, aOutputSz, aDlg );
pPrinter->SetMapMode( aOldMap );
pPrinter->SetFont( aOldFont );
+1 -1
View File
@@ -134,7 +134,7 @@ namespace vclcanvas
mpVDev->EnableMapMode( false );
mpVDev->SetAntialiasing( AntialiasingFlags::Enable );
const Point aEmptyPoint;
mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap );
mpVDev->DrawBitmap( aEmptyPoint, *maBitmap );
}
// canvas queried the VDev, and will possibly paint into
+1 -1
View File
@@ -615,7 +615,7 @@ namespace vclcanvas
{
// optimized case: identity matrix, or only
// translational components.
mpOutDevProvider->getOutDev().DrawBitmapEx( vcl::unotools::pointFromB2DPoint( aOutputPos ),
mpOutDevProvider->getOutDev().DrawBitmap( vcl::unotools::pointFromB2DPoint( aOutputPos ),
aBmp );
// Returning a cache object is not useful, the XBitmap
@@ -973,7 +973,7 @@ namespace vclcanvas
&nCol );
Bitmap aOutputBmp( aContentBmp.CreateColorBitmap(), aAlpha );
rOutDev.DrawBitmapEx( aPolygonDeviceRect.TopLeft(),
rOutDev.DrawBitmap( aPolygonDeviceRect.TopLeft(),
aOutputBmp );
}
else
+1 -1
View File
@@ -262,7 +262,7 @@ void LoadImage(std::u16string_view rPreviewFile, const AdditionsItem& rCurrentIt
//white background since images come with a white border
xVirDev->SetBackground(Wallpaper(COL_WHITE));
xVirDev->Erase();
xVirDev->DrawBitmapEx(Point(aThumbSize.Width() / 2 - aBmpSize.Width() / 2, Margin), aBmp);
xVirDev->DrawBitmap(Point(aThumbSize.Width() / 2 - aBmpSize.Width() / 2, Margin), aBmp);
rCurrentItem.m_xImageScreenshot->set_image(xVirDev.get());
xVirDev.disposeAndClear();
}
+1 -1
View File
@@ -18,7 +18,7 @@ ImageViewerDialog::ImageViewerDialog(weld::Dialog* pParent, Bitmap aBitmap, cons
aBitmap.Scale(Size(300, 300), BmpScaleFlag::Fast);
ScopedVclPtr<VirtualDevice> m_pVirDev = m_xDisplayImage->create_virtual_device();
m_pVirDev->SetOutputSizePixel(aBitmap.GetSizePixel());
m_pVirDev->DrawBitmapEx(Point(0, 0), aBitmap);
m_pVirDev->DrawBitmap(Point(0, 0), aBitmap);
m_xDisplayImage->set_image(m_pVirDev.get());
m_pVirDev.disposeAndClear();
}
+1 -1
View File
@@ -154,7 +154,7 @@ void UITabPage::UpdateImage(std::u16string_view sFileName)
{
ScopedVclPtr<VirtualDevice> m_pVirDev = m_pImage->create_virtual_device();
m_pVirDev->SetOutputSizePixel(aGraphic.GetSizePixel());
m_pVirDev->DrawBitmapEx(Point(0, 0), aGraphic.GetBitmap());
m_pVirDev->DrawBitmap(Point(0, 0), aGraphic.GetBitmap());
m_pImage->set_image(m_pVirDev.get());
m_pVirDev.disposeAndClear();
}
+1 -1
View File
@@ -2082,7 +2082,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl, weld::Toggleable&,
aBitmap.Scale(nScale, nScale);
}
pVD->SetOutputSizePixel(aBitmap.GetSizePixel(), false);
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
m_xGalleryMenu->append(sItemId, sGrfName, *pVD);
}
else
+2 -2
View File
@@ -1422,7 +1422,7 @@ void SvxLineTabPage::PopulateMenus()
}
pVD->SetOutputSizePixel(aBitmap.GetSizePixel());
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
m_xGalleryMenu->append(pInfo->sItemId, *pUIName, *pVD);
}
else
@@ -1505,7 +1505,7 @@ void SvxLineTabPage::PopulateMenus()
aBitmap.Scale(nScale, nScale);
}
pVD->SetOutputSizePixel(aBitmap.GetSizePixel());
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
m_xSymbolsMenu->append(pInfo->sItemId, u""_ustr, *pVD);
}
pPage->RemoveObject(0);
+2 -2
View File
@@ -559,7 +559,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools::
// in case of native controls we need to draw directly to the window
if (pSpl->_bNativeProgress && rRenderContext.IsNativeControlSupported(ControlType::IntroProgress, ControlPart::Entire))
{
rRenderContext.DrawBitmapEx(Point(), pSpl->_aIntroBmp);
rRenderContext.DrawBitmap(Point(), pSpl->_aIntroBmp);
ImplControlValue aValue( pSpl->_iProgress * pSpl->_barwidth / pSpl->_iMax);
tools::Rectangle aDrawRect( Point(pSpl->_tlx, pSpl->_tly), Size( pSpl->_barwidth, pSpl->_barheight));
@@ -583,7 +583,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools::
// non native drawing
// draw bitmap
_vdev->DrawBitmapEx(Point(), pSpl->_aIntroBmp);
_vdev->DrawBitmap(Point(), pSpl->_aIntroBmp);
if (pSpl->_bPaintProgress) {
// draw progress...
@@ -302,7 +302,7 @@ namespace drawinglayer::primitive2d
{
case Disposal::Not:
{
maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmap);
maVirtualDevice->DrawBitmap(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmap);
if (!rAnimationFrame.maBitmap.HasAlpha())
{
@@ -315,7 +315,7 @@ namespace drawinglayer::primitive2d
{
AlphaMask aAlphaMask = rAnimationFrame.maBitmap.CreateAlphaMask();
Bitmap aExpandVisibilityMask(aAlphaMask.GetBitmap(), aAlphaMask);
maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
maVirtualDeviceMask->DrawBitmap(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
}
break;
@@ -325,7 +325,7 @@ namespace drawinglayer::primitive2d
// #i70772# react on no mask, for primitives, too.
maVirtualDeviceMask->Erase();
maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmap);
maVirtualDevice->DrawBitmap(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmap);
if (!rAnimationFrame.maBitmap.HasAlpha())
{
@@ -338,16 +338,16 @@ namespace drawinglayer::primitive2d
{
const AlphaMask aMask(rAnimationFrame.maBitmap.CreateAlphaMask());
Bitmap aExpandVisibilityMask(aMask.GetBitmap(), aMask);
maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
maVirtualDeviceMask->DrawBitmap(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
}
break;
}
case Disposal::Previous:
{
maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmap);
maVirtualDevice->DrawBitmap(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmap);
Bitmap aExpandVisibilityMask(rAnimationFrame.maBitmap.CreateAlphaMask().GetBitmap(), rAnimationFrame.maBitmap.CreateAlphaMask());
maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
maVirtualDeviceMask->DrawBitmap(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
break;
}
}
@@ -313,10 +313,10 @@ void doSpeedCompare(double fTrans, const Bitmap& rContent, const tools::Rectangl
// numbers are pretty small
for (a = 0; a < nRepeat; a++)
{
// "Former" method using a temporary AlphaMask & DrawBitmapEx
// "Former" method using a temporary AlphaMask & DrawBitmap
sal_uInt8 nMaskValue(static_cast<sal_uInt8>(basegfx::fround(fTrans * 255.0)));
const AlphaMask aAlphaMask(aSizePixel, &nMaskValue);
rOutDev.DrawBitmapEx(rDestPixel.TopLeft(), Bitmap(rContent, aAlphaMask));
rOutDev.DrawBitmap(rDestPixel.TopLeft(), Bitmap(rContent, aAlphaMask));
}
// get intermediate time
@@ -487,7 +487,7 @@ void impBufferDevice::paint(double fTrans)
#endif
Bitmap aContent(mpContent->GetBitmap(aEmptyPoint, aSizePixel));
mrOutDev.DrawBitmapEx(maDestPixel.TopLeft(), Bitmap(aContent, aAlphaMask));
mrOutDev.DrawBitmap(maDestPixel.TopLeft(), Bitmap(aContent, aAlphaMask));
}
else if (0.0 != fTrans)
{
@@ -549,10 +549,10 @@ void impBufferDevice::paint(double fTrans)
}
else
{
// "Former" method using a temporary AlphaMask & DrawBitmapEx
// "Former" method using a temporary AlphaMask & DrawBitmap
sal_uInt8 nMaskValue(static_cast<sal_uInt8>(basegfx::fround(fTrans * 255.0)));
const AlphaMask aAlphaMask(aSizePixel, &nMaskValue);
mrOutDev.DrawBitmapEx(maDestPixel.TopLeft(), Bitmap(aContent, aAlphaMask));
mrOutDev.DrawBitmap(maDestPixel.TopLeft(), Bitmap(aContent, aAlphaMask));
}
}
}
@@ -2707,11 +2707,11 @@ void VclMetafileProcessor2D::processTransparencePrimitive2D(
basegfx::fround(aDiscreteRange.getHeight()), nMaximumQuadraticPixels));
// add to target metafile (will create MetaFloatTransparentAction)
mpOutputDevice->DrawBitmapEx(Point(basegfx::fround<tools::Long>(aLogicRange.getMinX()),
basegfx::fround<tools::Long>(aLogicRange.getMinY())),
Size(basegfx::fround<tools::Long>(aLogicRange.getWidth()),
basegfx::fround<tools::Long>(aLogicRange.getHeight())),
aBitmap);
mpOutputDevice->DrawBitmap(Point(basegfx::fround<tools::Long>(aLogicRange.getMinX()),
basegfx::fround<tools::Long>(aLogicRange.getMinY())),
Size(basegfx::fround<tools::Long>(aLogicRange.getWidth()),
basegfx::fround<tools::Long>(aLogicRange.getHeight())),
aBitmap);
}
void VclMetafileProcessor2D::processStructureTagPrimitive2D(
@@ -743,12 +743,12 @@ bool VclProcessor2D::RenderFillGraphicPrimitive2DImpl(
{
if (bPreScaled)
{
mpOutputDevice->DrawBitmapEx(aOutRectPixel.TopLeft(), aBitmap);
mpOutputDevice->DrawBitmap(aOutRectPixel.TopLeft(), aBitmap);
}
else
{
mpOutputDevice->DrawBitmapEx(aOutRectPixel.TopLeft(),
aNeededBitmapSizePixel, aBitmap);
mpOutputDevice->DrawBitmap(aOutRectPixel.TopLeft(), aNeededBitmapSizePixel,
aBitmap);
}
}
}
@@ -768,12 +768,12 @@ bool VclProcessor2D::RenderFillGraphicPrimitive2DImpl(
{
if (bPreScaled)
{
mpOutputDevice->DrawBitmapEx(aOutRectPixel.TopLeft(), aBitmap);
mpOutputDevice->DrawBitmap(aOutRectPixel.TopLeft(), aBitmap);
}
else
{
mpOutputDevice->DrawBitmapEx(aOutRectPixel.TopLeft(),
aNeededBitmapSizePixel, aBitmap);
mpOutputDevice->DrawBitmap(aOutRectPixel.TopLeft(), aNeededBitmapSizePixel,
aBitmap);
}
}
}
@@ -1124,7 +1124,7 @@ void VclProcessor2D::RenderMarkerArrayPrimitive2D(
const Point aDiscretePoint(basegfx::fround<tools::Long>(aDiscreteTopLeft.getX()),
basegfx::fround<tools::Long>(aDiscreteTopLeft.getY()));
mpOutputDevice->DrawBitmapEx(aDiscretePoint + aOrigin, rMarker);
mpOutputDevice->DrawBitmap(aDiscretePoint + aOrigin, rMarker);
}
mpOutputDevice->EnableMapMode(bWasEnabled);
+1 -1
View File
@@ -58,7 +58,7 @@ class GridWindow : public weld::CustomWidgetController
void draw(vcl::RenderContext& rRenderContext, const Bitmap& rBitmap)
{
const Point aOffset(rRenderContext.PixelToLogic(Point(mnOffX, mnOffY)));
rRenderContext.DrawBitmapEx(maPos - aOffset, rBitmap);
rRenderContext.DrawBitmap(maPos - aOffset, rBitmap);
}
bool isHit(OutputDevice const & rWin, const Point& rPos)
+1 -1
View File
@@ -944,7 +944,7 @@ void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
Size(PREVIEW_WIDTH, PREVIEW_HEIGHT)));
rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
// check for sane values
rRenderContext.DrawBitmapEx(maPreviewRect.TopLeft(), maPreviewRect.GetSize(), maPreviewBitmap);
rRenderContext.DrawBitmap(maPreviewRect.TopLeft(), maPreviewRect.GetSize(), maPreviewBitmap);
DrawDrag(rRenderContext);
}
-20
View File
@@ -1317,26 +1317,6 @@ public:
const Bitmap& rBitmap,
MetaActionType nAction );
// draw bitmap (potentially with alpha)
void DrawBitmapEx(
const Point& rDestPt,
const Bitmap& rBitmap );
// draw bitmap (potentially with alpha)
void DrawBitmapEx(
const Point& rDestPt,
const Size& rDestSize,
const Bitmap& rBitmapEx );
// draw bitmap (potentially with alpha)
void DrawBitmapEx(
const Point& rDestPt,
const Size& rDestSize,
const Point& rSrcPtPixel,
const Size& rSrcSizePixel,
const Bitmap& rBitmap);
// draw bitmap with alpha information
SAL_DLLPRIVATE void DrawAlphaBitmap(
const Point& rDestPt,
+1 -1
View File
@@ -983,7 +983,7 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldI
auto popIt = rRenderContext.ScopedPush();
rRenderContext.SetClipRegion(vcl::Region(rRect));
rRenderContext.DrawBitmapEx(Point(rRect.Left() + 2 * nOneX, rRect.Bottom() - 2 * nOneY - aHeight), Size(aWidth, aHeight), rIcon);
rRenderContext.DrawBitmap(Point(rRect.Left() + 2 * nOneX, rRect.Bottom() - 2 * nOneY - aHeight), Size(aWidth, aHeight), rIcon);
}
void drawCells(vcl::RenderContext& rRenderContext, std::optional<Color> const & pColor, const SvxBrushItem* pBackground, std::optional<Color>& pOldColor, const SvxBrushItem*& pOldBackground,
+1 -1
View File
@@ -924,7 +924,7 @@ void SvxBulletAndPositionDlg::PopulateGalleryMenu()
aBitmap.Scale(nScale, nScale);
}
pVD->SetOutputSizePixel(aBitmap.GetSizePixel(), false);
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
// We want to show only icon names not full path.
aObj.removeExtension();
+1 -1
View File
@@ -446,7 +446,7 @@ VclPtr<VirtualDevice> LayoutMenu::GetVirtualDevice(Image pImage)
aPreviewBitmap.Scale(pVDev->GetDPIScaleFactor(), pVDev->GetDPIScaleFactor());
const Size aSize(aPreviewBitmap.GetSizePixel());
pVDev->SetOutputSizePixel(aSize);
pVDev->DrawBitmapEx(aNull, aPreviewBitmap);
pVDev->DrawBitmap(aNull, aPreviewBitmap);
return pVDev;
}
+1 -1
View File
@@ -478,7 +478,7 @@ VclPtr<VirtualDevice> MasterPagesSelector::GetVirtualDevice(const Image& rImage)
aPreviewBitmap.Scale(pVDev->GetDPIScaleFactor(), pVDev->GetDPIScaleFactor());
const Size aSize(aPreviewBitmap.GetSizePixel());
pVDev->SetOutputSizePixel(aSize);
pVDev->DrawBitmapEx(aNull, aPreviewBitmap);
pVDev->DrawBitmap(aNull, aPreviewBitmap);
return pVDev;
}
@@ -144,7 +144,7 @@ void FramePainter::OffsetBitmap::PaintCorner (
const Point& rAnchor) const
{
if ( ! maBitmap.IsEmpty())
rDevice.DrawBitmapEx(rAnchor+maOffset, maBitmap);
rDevice.DrawBitmap(rAnchor+maOffset, maBitmap);
}
void FramePainter::OffsetBitmap::PaintSide (
@@ -172,7 +172,7 @@ void FramePainter::OffsetBitmap::PaintSide (
- 1);
for (sal_Int32 nX=nLeft; nX<=nRight; nX+=aBitmapSize.Width())
{
rDevice.DrawBitmapEx(
rDevice.DrawBitmap(
Point(nX,nY),
Size(std::min(aBitmapSize.Width(),static_cast<::tools::Long>(nRight-nX+1)),aBitmapSize.Height()),
maBitmap);
@@ -192,7 +192,7 @@ void FramePainter::OffsetBitmap::PaintSide (
- 1);
for (sal_Int32 nY=nTop; nY<=nBottom; nY+=aBitmapSize.Height())
{
rDevice.DrawBitmapEx(
rDevice.DrawBitmap(
Point(nX,nY),
Size(aBitmapSize.Width(), std::min(aBitmapSize.Height(), static_cast<::tools::Long>(nBottom-nY+1))),
maBitmap);
@@ -214,7 +214,7 @@ void FramePainter::OffsetBitmap::PaintCenter (
const Size aBitmapSize (maBitmap.GetSizePixel());
for (::tools::Long nY=rBox.Top(); nY<=rBox.Bottom(); nY+=aBitmapSize.Height())
for (::tools::Long nX=rBox.Left(); nX<=rBox.Right(); nX+=aBitmapSize.Width())
rDevice.DrawBitmapEx(
rDevice.DrawBitmap(
Point(nX,nY),
Size(
::std::min(aBitmapSize.Width(), rBox.Right()-nX+1),
@@ -179,7 +179,7 @@ Point InsertionIndicatorOverlay::PaintRepresentatives (
// Paint the preview.
Bitmap aPreview (rRepresentatives[nIndex].maBitmap);
aPreview.Scale(rPreviewSize, BmpScaleFlag::BestQuality);
rContent.DrawBitmapEx(aPageOffset, aPreview);
rContent.DrawBitmap(aPageOffset, aPreview);
// When the page is marked as excluded from the slide show then
// paint an overlay that visualizes this.
@@ -194,7 +194,7 @@ Point InsertionIndicatorOverlay::PaintRepresentatives (
{
for (::tools::Long nX=0; nX<rPreviewSize.Width(); nX+=nIconWidth)
for (::tools::Long nY=0; nY<rPreviewSize.Height(); nY+=nIconHeight)
rContent.DrawBitmapEx(Point(nX,nY)+aPageOffset, aExclusionOverlay);
rContent.DrawBitmap(Point(nX,nY)+aPageOffset, aExclusionOverlay);
}
rContent.SetClipRegion(aSavedClipRegion);
}
@@ -143,9 +143,9 @@ void PageObjectPainter::PaintPreview (
if ( ! aPreview.IsEmpty())
{
if (aPreview.GetSizePixel() != aBox.GetSize())
rDevice.DrawBitmapEx(aBox.TopLeft(), aBox.GetSize(), aPreview);
rDevice.DrawBitmap(aBox.TopLeft(), aBox.GetSize(), aPreview);
else
rDevice.DrawBitmapEx(aBox.TopLeft(), aPreview);
rDevice.DrawBitmap(aBox.TopLeft(), aPreview);
}
}
@@ -162,7 +162,7 @@ Bitmap PageObjectPainter::CreateMarkedPreview (
pDevice.disposeAndReset(VclPtr<VirtualDevice>::Create());
pDevice->SetOutputSizePixel(rSize);
pDevice->DrawBitmapEx(Point(0,0), rSize, rPreview);
pDevice->DrawBitmap(Point(0,0), rSize, rPreview);
// Paint bitmap tiled over the preview to mark it as excluded.
const sal_Int32 nIconWidth (rOverlay.GetSizePixel().Width());
@@ -171,7 +171,7 @@ Bitmap PageObjectPainter::CreateMarkedPreview (
{
for (::tools::Long nX=0; nX<rSize.Width(); nX+=nIconWidth)
for (::tools::Long nY=0; nY<rSize.Height(); nY+=nIconHeight)
pDevice->DrawBitmapEx(Point(nX,nY), rOverlay);
pDevice->DrawBitmap(Point(nX,nY), rOverlay);
}
return pDevice->GetBitmap(Point(0,0), rSize);
}
@@ -275,7 +275,7 @@ void PageObjectPainter::PaintTransitionEffect (
PageObjectLayouter::Part::TransitionEffectIndicator,
PageObjectLayouter::ModelCoordinateSystem));
rDevice.DrawBitmapEx(
rDevice.DrawBitmap(
aBox.TopCenter(),
pPageObjectLayouter->GetTransitionEffectIcon().GetBitmap());
}
@@ -296,7 +296,7 @@ void PageObjectPainter::PaintCustomAnimationEffect (
rpDescriptor,
PageObjectLayouter::Part::CustomAnimationEffectIndicator,
PageObjectLayouter::ModelCoordinateSystem));
rDevice.DrawBitmapEx(
rDevice.DrawBitmap(
aBox.TopCenter(),
pPageObjectLayouter->GetCustomAnimationEffectIcon().GetBitmap());
}
+1 -1
View File
@@ -446,7 +446,7 @@ Image PreviewRenderer::ScaleBitmap (
// Paint the bitmap scaled to the desired width.
Bitmap aScaledBitmap(rBitmap);
aScaledBitmap.Scale (aPreviewSize, BmpScaleFlag::BestQuality);
mpPreviewDevice->DrawBitmapEx (
mpPreviewDevice->DrawBitmap (
Point(1,1),
aPreviewSize,
aScaledBitmap);
+1 -1
View File
@@ -272,7 +272,7 @@ void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
const int nX = (rSize.Width() - aImgSize.Width())/2;
int nY = (rSize.Height() - 3 * nTextHeight - aImgSize.Height())/2;
Point aImgPoint(nX, nY);
rRenderContext.DrawBitmapEx(aImgPoint, aImgSize, maWelcomeImage);
rRenderContext.DrawBitmap(aImgPoint, aImgSize, maWelcomeImage);
nY = nY + aImgSize.Height();
rRenderContext.DrawText(tools::Rectangle(0, nY + 1 * nTextHeight, rSize.Width(), nY + nTextHeight),
+2 -2
View File
@@ -223,8 +223,8 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUStri
const Size aOverlaySize(aModule.GetSizePixel());
ScopedVclPtr<VirtualDevice> pVirDev(VclPtr<VirtualDevice>::Create());
pVirDev->SetOutputSizePixel(aSize);
pVirDev->DrawBitmapEx(Point(), aThumbnail);
pVirDev->DrawBitmapEx(Point(aSize.Width() - aOverlaySize.Width() - 5,
pVirDev->DrawBitmap(Point(), aThumbnail);
pVirDev->DrawBitmap(Point(aSize.Width() - aOverlaySize.Width() - 5,
aSize.Height() - aOverlaySize.Height() - 5),
aModule);
aThumbnail = pVirDev->GetBitmap(Point(), aSize);
+1 -1
View File
@@ -141,7 +141,7 @@ public:
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override
{
rRenderContext.DrawBitmapEx(Point(0, 0), maBrandImage);
rRenderContext.DrawBitmap(Point(0, 0), maBrandImage);
}
};
+1 -1
View File
@@ -55,7 +55,7 @@ public:
{
rRenderContext.SetBackground(Theme::GetColor(Theme::Color_DeckTitleBarBackground));
rRenderContext.Erase();
rRenderContext.DrawBitmapEx(Point(0, 0), maGrip);
rRenderContext.DrawBitmap(Point(0, 0), maGrip);
}
};
@@ -298,7 +298,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
{
case Disposal::Not:
{
pVDev->DrawBitmapEx(rAnimationFrame.maPositionPixel,
pVDev->DrawBitmap(rAnimationFrame.maPositionPixel,
rAnimationFrame.maBitmap);
if (!rAnimationFrame.maBitmap.HasAlpha())
@@ -311,7 +311,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
{
AlphaMask aMask = rAnimationFrame.maBitmap.CreateAlphaMask();
Bitmap aTmpMask(aMask.GetBitmap(), aMask);
pVDevMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aTmpMask);
pVDevMask->DrawBitmap(rAnimationFrame.maPositionPixel, aTmpMask);
}
break;
}
@@ -342,7 +342,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
case Disposal::Previous:
{
pVDev->DrawBitmapEx(rAnimationFrame.maPositionPixel,
pVDev->DrawBitmap(rAnimationFrame.maPositionPixel,
rAnimationFrame.maBitmap);
pVDevMask->DrawBitmap(rAnimationFrame.maPositionPixel,
rAnimationFrame.maBitmap.CreateAlphaMask().GetBitmap());
+1 -1
View File
@@ -157,7 +157,7 @@ public:
Point aPosition = maRect.TopLeft();
aPosition.AdjustX(2);
aPosition.AdjustY((maRect.getOpenHeight() - aBitmap.GetSizePixel().Height()) / 2);
mrRenderContext.DrawBitmapEx(aPosition, aBitmap);
mrRenderContext.DrawBitmap(aPosition, aBitmap);
}
}
+1 -1
View File
@@ -1502,7 +1502,7 @@ void ValueSet::ImplFormatItem(vcl::RenderContext const & rRenderContext, ValueSe
if (!aBlendFrame.IsEmpty())
{
maVirDev->DrawBitmapEx(aRect.TopLeft(), aBlendFrame);
maVirDev->DrawBitmap(aRect.TopLeft(), aBlendFrame);
}
}
}
+1 -1
View File
@@ -785,7 +785,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const tools::Rectangle &rRect, con
nWidth = nW;
}
pOut->DrawBitmapEx(aP, Size( nWidth, nHeight ), aBmp);
pOut->DrawBitmap(aP, Size( nWidth, nHeight ), aBmp);
}
pOut->IntersectClipRegion( rRect );
+2 -2
View File
@@ -53,7 +53,7 @@ void DialControlBmp::CopyBackground( const DialControlBmp& rSrc )
SetSize(rSrc.maRect.GetSize());
mbEnabled = rSrc.mbEnabled;
Point aPos;
DrawBitmapEx( aPos, rSrc.GetBitmap( aPos, maRect.GetSize() ) );
DrawBitmap( aPos, rSrc.GetBitmap( aPos, maRect.GetSize() ) );
}
void DialControlBmp::DrawBackground( const Size& rSize, bool bEnabled )
@@ -276,7 +276,7 @@ void DialControl::Resize()
void DialControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
Point aPos;
rRenderContext.DrawBitmapEx(aPos, mpImpl->mxBmpBuffered->GetBitmap(aPos, mpImpl->maWinSize));
rRenderContext.DrawBitmap(aPos, mpImpl->mxBmpBuffered->GetBitmap(aPos, mpImpl->maWinSize));
}
void DialControl::StyleUpdated()
+26 -26
View File
@@ -323,30 +323,30 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangl
// CompletelyDisabled() added to have a disabled state for SvxRectCtl
if (IsCompletelyDisabled())
{
rRenderContext.DrawBitmapEx(m_aPtLT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtMT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtRT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtLM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtMM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtRM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtLB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtMB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtRB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtLT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtMT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtRT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtLM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtMM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtRM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtLB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtMB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtRB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
}
else
{
rRenderContext.DrawBitmapEx(m_aPtLT - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtMT - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtRT - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtLM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtLT - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtMT - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtRT - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtLM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
// Center for rectangle and line
rRenderContext.DrawBitmapEx(m_aPtMM - aToCenter, aDstBtnSize, aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtMM - aToCenter, aDstBtnSize, aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtRM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtLB - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtMB - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmapEx(m_aPtRB - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtRM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtLB - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtMB - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(m_aPtRB - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
}
// draw active button, avoid center pos for angle
@@ -358,7 +358,7 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangl
Point aCenterPt(m_aPtNew);
aCenterPt -= aToCenter;
rRenderContext.DrawBitmapEx(aCenterPt, aDstBtnSize, aBtnPnt2, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(aCenterPt, aDstBtnSize, aBtnPnt2, aBtnSize, rBitmap);
}
}
}
@@ -950,7 +950,7 @@ void SvxLineLB::Fill( const XDashListRef &pList )
const Bitmap aBitmap = pList->GetBitmapForUISolidLine();
const Size aBmpSize(aBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
m_xControl->append(u""_ustr, pList->GetStringForUiSolidLine(), *pVD);
}
@@ -967,7 +967,7 @@ void SvxLineLB::Fill( const XDashListRef &pList )
{
const Size aBmpSize(aBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
m_xControl->append(u""_ustr, pEntry->GetName(), *pVD);
}
else
@@ -987,7 +987,7 @@ void SvxLineLB::Append( const XDashEntry& rEntry, const Bitmap& rBitmap )
const Size aBmpSize(rBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), rBitmap);
pVD->DrawBitmap(Point(), rBitmap);
m_xControl->append(u""_ustr, rEntry.GetName(), *pVD);
}
else
@@ -1006,7 +1006,7 @@ void SvxLineLB::Modify(const XDashEntry& rEntry, sal_Int32 nPos, const Bitmap& r
const Size aBmpSize(rBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), rBitmap);
pVD->DrawBitmap(Point(), rBitmap);
m_xControl->insert(nPos, rEntry.GetName(), nullptr, nullptr, pVD);
}
else
@@ -1037,7 +1037,7 @@ void SvxLineEndLB::Fill( const XLineEndListRef &pList, bool bStart )
{
const Size aBmpSize(aBitmap.GetSizePixel());
pVD->SetOutputSizePixel(Size(aBmpSize.Width() / 2, aBmpSize.Height()), false);
pVD->DrawBitmapEx(bStart ? Point() : Point(-aBmpSize.Width() / 2, 0), aBitmap);
pVD->DrawBitmap(bStart ? Point() : Point(-aBmpSize.Width() / 2, 0), aBitmap);
m_xControl->append(u""_ustr, pEntry->GetName(), *pVD);
}
else
@@ -1055,7 +1055,7 @@ void SvxLineEndLB::Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap )
const Size aBmpSize(rBitmap.GetSizePixel());
pVD->SetOutputSizePixel(Size(aBmpSize.Width() / 2, aBmpSize.Height()), false);
pVD->DrawBitmapEx(Point(-aBmpSize.Width() / 2, 0), rBitmap);
pVD->DrawBitmap(Point(-aBmpSize.Width() / 2, 0), rBitmap);
m_xControl->append(u""_ustr, rEntry.GetName(), *pVD);
}
else
@@ -1074,7 +1074,7 @@ void SvxLineEndLB::Modify( const XLineEndEntry& rEntry, sal_Int32 nPos, const Bi
const Size aBmpSize(rBitmap.GetSizePixel());
pVD->SetOutputSizePixel(Size(aBmpSize.Width() / 2, aBmpSize.Height()), false);
pVD->DrawBitmapEx(Point(-aBmpSize.Width() / 2, 0), rBitmap);
pVD->DrawBitmap(Point(-aBmpSize.Width() / 2, 0), rBitmap);
m_xControl->insert(nPos, rEntry.GetName(), nullptr, nullptr, pVD);
}
else
+1 -1
View File
@@ -719,7 +719,7 @@ void FrameSelectorImpl::CopyVirDevToControl(vcl::RenderContext& rRenderContext)
{
if (mbFullRepaint)
DrawVirtualDevice();
rRenderContext.DrawBitmapEx(maVirDevPos, mpVirDev->GetBitmap(Point(0, 0), mpVirDev->GetOutputSizePixel()));
rRenderContext.DrawBitmap(maVirDevPos, mpVirDev->GetBitmap(Point(0, 0), mpVirDev->GetOutputSizePixel()));
}
void FrameSelectorImpl::DrawAllTrackingRects(vcl::RenderContext& rRenderContext)
+1 -1
View File
@@ -1138,7 +1138,7 @@ void GalleryBrowser::UpdateRows(bool bVisibleOnly)
GalleryIconView::drawTransparenceBackground(*xDev, aPos, aBitmapSizePixel);
}
xDev->DrawBitmapEx(aPos, aBitmap);
xDev->DrawBitmap(aPos, aBitmap);
}
mxListView->set_text(rEntry, sItemTextTitle);
+1 -1
View File
@@ -360,7 +360,7 @@ void GalleryIconView::UserDraw(const UserDrawEvent& rUDEvt)
GalleryIconView::drawTransparenceBackground(*pDev, rRect.TopLeft(), rRect.GetSize());
}
pDev->DrawBitmapEx(aPos, aBitmap);
pDev->DrawBitmap(aPos, aBitmap);
}
SetItemText(nId, aItemTextTitle);
+1 -1
View File
@@ -355,7 +355,7 @@ static rtl::Reference<SdrObject> ImpCreateShadowObjectClone(const SdrObject& rOr
ScopedVclPtr<VirtualDevice> pVirDev(VclPtr<VirtualDevice>::Create());
pVirDev->SetOutputSizePixel(aBitmap.GetSizePixel());
BitmapFilter::Filter(aBitmap, BitmapShadowFilter(aShadowColor));
pVirDev->DrawBitmapEx(Point(), aBitmap);
pVirDev->DrawBitmap(Point(), aBitmap);
aGraphicObject.SetGraphic(Graphic(pVirDev->GetBitmap(Point(0,0), aBitmap.GetSizePixel())));
}
+2 -2
View File
@@ -415,7 +415,7 @@ void SvxFillToolBoxControl::Update()
ScopedVclPtrInstance< VirtualDevice > pVD;
const Size aBmpSize(aBmp.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), aBmp);
pVD->DrawBitmap(Point(), aBmp);
mpLbFillAttr->append(u""_ustr, xGradientList->Get(0)->GetName(), *pVD);
mpLbFillAttr->set_active(mpLbFillAttr->get_count() - 1);
}
@@ -478,7 +478,7 @@ void SvxFillToolBoxControl::Update()
ScopedVclPtrInstance< VirtualDevice > pVD;
const Size aBmpSize(aBmp.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), aBmp);
pVD->DrawBitmap(Point(), aBmp);
mpLbFillAttr->append(u""_ustr, xHatchList->GetHatch(0)->GetName(), *pVD);
mpLbFillAttr->set_active(mpLbFillAttr->get_count() - 1);
}
+1 -1
View File
@@ -117,7 +117,7 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
pVDev->DrawCheckered(aNull, aSize, nLen, aW, aG);
pVDev->DrawBitmapEx(aNull, aThumb);
pVDev->DrawBitmap(aNull, aThumb);
maFavoritesHorizontal.emplace_back(pVDev->GetBitmap(Point(0,0), aSize));
}
}
+6 -6
View File
@@ -219,7 +219,7 @@ namespace
if(rBitmap.GetSizePixel().Width() >= rSize.Width() && rBitmap.GetSizePixel().Height() >= rSize.Height())
{
rBitmap.Scale(rSize);
pVirtualDevice->DrawBitmapEx(Point(0, 0), rBitmap);
pVirtualDevice->DrawBitmap(Point(0, 0), rBitmap);
}
else
{
@@ -229,7 +229,7 @@ namespace
{
for(tools::Long x(0); x < rSize.Width(); x += aBitmapSize.Width())
{
pVirtualDevice->DrawBitmapEx(
pVirtualDevice->DrawBitmap(
Point(x, y),
rBitmap);
}
@@ -257,7 +257,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XHatchListRef &pList)
{
const Size aBmpSize(aBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
rBox.append(u""_ustr, pEntry->GetName(), *pVD);
}
else
@@ -284,7 +284,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XGradientListRef &pList)
{
const Size aBmpSize(aBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
rBox.append(u""_ustr, pEntry->GetName(), *pVD);
}
else
@@ -311,7 +311,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XBitmapListRef &pList)
const XBitmapEntry* pEntry = pList->GetBitmap( i );
Bitmap aBitmap = pEntry->GetGraphicObject().GetGraphic().GetBitmap();
formatBitmapToSize(aBitmap, aSize);
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
rBox.append(u""_ustr, pEntry->GetName(), *pVD);
}
@@ -335,7 +335,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XPatternListRef &pList)
const XBitmapEntry* pEntry = pList->GetBitmap( i );
Bitmap aBitmap = pEntry->GetGraphicObject().GetGraphic().GetBitmap();
formatBitmapToSize(aBitmap, aSize);
pVD->DrawBitmapEx(Point(), aBitmap);
pVD->DrawBitmap(Point(), aBitmap);
rBox.append(u""_ustr, pEntry->GetName(), *pVD);
}
+2 -2
View File
@@ -374,7 +374,7 @@ void SvxLineEndWindow::FillValueSet()
Point aPt0( 0, 0 );
Point aPt1( maBmpSize.Width(), 0 );
pVD->DrawBitmapEx( Point(), aBmp );
pVD->DrawBitmap( Point(), aBmp );
mxLineEndSet->InsertItem(1, Image(pVD->GetBitmap(aPt0, maBmpSize)), pEntry->GetName());
mxLineEndSet->InsertItem(2, Image(pVD->GetBitmap(aPt1, maBmpSize)), pEntry->GetName());
@@ -387,7 +387,7 @@ void SvxLineEndWindow::FillValueSet()
aBmp = mpLineEndList->GetUiBitmap( i );
OSL_ENSURE( !aBmp.IsEmpty(), "UI bitmap was not created" );
pVD->DrawBitmapEx( aPt0, aBmp );
pVD->DrawBitmap( aPt0, aBmp );
mxLineEndSet->InsertItem(static_cast<sal_uInt16>((i+1)*2L+1),
Image(pVD->GetBitmap(aPt0, maBmpSize)), pEntry->GetName());
mxLineEndSet->InsertItem(static_cast<sal_uInt16>((i+2)*2L),
+1 -1
View File
@@ -76,7 +76,7 @@ void XOBitmap::Bitmap2Array()
m_pPixelArray.reset( new sal_uInt16[ nLines * nLines ] );
pVDev->SetOutputSizePixel( aBitmap.GetSizePixel() );
pVDev->DrawBitmapEx( Point(), aBitmap );
pVDev->DrawBitmap( Point(), aBitmap );
m_aPixelColor = m_aBckgrColor = pVDev->GetPixel( Point() );
// create array and determine foreground and background color
+2 -2
View File
@@ -76,7 +76,7 @@ Bitmap XBitmapList::CreateBitmap( tools::Long nIndex, const Size& rSize ) const
if(rBitmap.GetSizePixel().Width() >= rSize.Width() && rBitmap.GetSizePixel().Height() >= rSize.Height())
{
rBitmap.Scale(rSize);
pVirtualDevice->DrawBitmapEx(Point(0, 0), rBitmap);
pVirtualDevice->DrawBitmap(Point(0, 0), rBitmap);
}
else
{
@@ -86,7 +86,7 @@ Bitmap XBitmapList::CreateBitmap( tools::Long nIndex, const Size& rSize ) const
{
for(tools::Long x(0); x < rSize.Width(); x += aBitmapSize.Width())
{
pVirtualDevice->DrawBitmapEx(
pVirtualDevice->DrawBitmap(
Point(x, y),
rBitmap);
}
+2 -2
View File
@@ -111,7 +111,7 @@ Bitmap XPatternList::CreateBitmap( tools::Long nIndex, const Size& rSize ) const
if(rBitmap.GetSizePixel().Width() >= rSize.Width() && rBitmap.GetSizePixel().Height() >= rSize.Height())
{
rBitmap.Scale(rSize);
pVirtualDevice->DrawBitmapEx(Point(0, 0), rBitmap);
pVirtualDevice->DrawBitmap(Point(0, 0), rBitmap);
}
else
{
@@ -121,7 +121,7 @@ Bitmap XPatternList::CreateBitmap( tools::Long nIndex, const Size& rSize ) const
{
for(tools::Long x(0); x < rSize.Width(); x += aBitmapSize.Width())
{
pVirtualDevice->DrawBitmapEx(
pVirtualDevice->DrawBitmap(
Point(x, y),
rBitmap);
}
+6 -6
View File
@@ -6293,7 +6293,7 @@ enum PaintArea {LEFT, RIGHT, TOP, BOTTOM};
#define BORDER_TILE_SIZE 512
/// Wrapper around pOut->DrawBitmapEx.
/// Wrapper around pOut->DrawBitmap.
static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoint, const Size& aSize, const Bitmap& rBitmap, PaintArea eArea)
{
if(!comphelper::LibreOfficeKit::isActive())
@@ -6331,7 +6331,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
tools::Rectangle aRender = aComplete.GetIntersection(aTile);
if (aRender.IsEmpty())
break;
pOut->DrawBitmapEx(pOut->PixelToLogic(aRender.TopLeft()),
pOut->DrawBitmap(pOut->PixelToLogic(aRender.TopLeft()),
pOut->PixelToLogic(aRender.GetSize()),
Point(0, 0), aRender.GetSize(),
rBitmap);
@@ -6438,9 +6438,9 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
// Right shadow & corners
if ( bPaintRightShadow )
{
pOut->DrawBitmapEx( pOut->PixelToLogic( Point( aPaintRect.Right(), aPagePxRect.Bottom() + 1 - (aPageBottomRightShadow.GetSizePixel().Height() - snShadowPxWidth) ) ),
pOut->DrawBitmap( pOut->PixelToLogic( Point( aPaintRect.Right(), aPagePxRect.Bottom() + 1 - (aPageBottomRightShadow.GetSizePixel().Height() - snShadowPxWidth) ) ),
aPageBottomRightShadow );
pOut->DrawBitmapEx( pOut->PixelToLogic( Point( aPaintRect.Right(), aPagePxRect.Top() - snShadowPxWidth ) ),
pOut->DrawBitmap( pOut->PixelToLogic( Point( aPaintRect.Right(), aPagePxRect.Top() - snShadowPxWidth ) ),
aPageTopRightShadow );
if (aPagePxRect.Height() > 2 * snShadowPxWidth)
@@ -6461,9 +6461,9 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
if(bPaintLeftShadow)
{
const tools::Long lLeft = aPaintRect.Left() - aPageBottomLeftShadow.GetSizePixel().Width();
pOut->DrawBitmapEx( pOut->PixelToLogic( Point( lLeft,
pOut->DrawBitmap( pOut->PixelToLogic( Point( lLeft,
aPagePxRect.Bottom() + 1 + snShadowPxWidth - aPageBottomLeftShadow.GetSizePixel().Height() ) ), aPageBottomLeftShadow );
pOut->DrawBitmapEx( pOut->PixelToLogic( Point( lLeft, aPagePxRect.Top() - snShadowPxWidth ) ), aPageTopLeftShadow );
pOut->DrawBitmap( pOut->PixelToLogic( Point( lLeft, aPagePxRect.Top() - snShadowPxWidth ) ), aPageTopLeftShadow );
if (aPagePxRect.Height() > 2 * snShadowPxWidth)
{
const tools::Long nWidth = aPageLeftShadow.GetSizePixel().Width();
+2 -2
View File
@@ -2830,7 +2830,7 @@ void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
if (m_bVert)
nMirrorFlags |= BmpMirrorFlags::Horizontal;
aTmpBmp.Mirror(nMirrorFlags);
rRenderContext.DrawBitmapEx(aPntPos, aPntSz, aTmpBmp);
rRenderContext.DrawBitmap(aPntPos, aPntSz, aTmpBmp);
}
else if (m_bGraphic) //draw unmirrored preview graphic
{
@@ -2838,7 +2838,7 @@ void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
}
else //draw unmirrored stock sample image
{
rRenderContext.DrawBitmapEx(aPntPos, aPntSz, m_aBmp);
rRenderContext.DrawBitmap(aPntPos, aPntSz, m_aBmp);
}
}
+1 -1
View File
@@ -296,7 +296,7 @@ void VCLXGraphics::draw( const uno::Reference< awt::XDisplayBitmap >& rxBitmapHa
if(nSourceX || nSourceY || aSz.Width() != nSourceWidth || aSz.Height() != nSourceHeight)
mpOutputDevice->IntersectClipRegion(vcl::Region(tools::Rectangle(nDestX, nDestY, nDestX + nDestWidth - 1, nDestY + nDestHeight - 1)));
mpOutputDevice->DrawBitmapEx( aPos, aSz, aBmp );
mpOutputDevice->DrawBitmap( aPos, aSz, aBmp );
}
void VCLXGraphics::drawPixel( sal_Int32 x, sal_Int32 y )
@@ -281,13 +281,13 @@ namespace svt::table
if ( nDrawTextFlags & DrawTextFlags::Right )
{
// text is right aligned => draw the sort indicator at the left hand side
rRenderContext.DrawBitmapEx(Point(_rArea.Left() + nSortIndicatorPaddingX, _rArea.Top() + nSortIndicatorPaddingY),
rRenderContext.DrawBitmap(Point(_rArea.Left() + nSortIndicatorPaddingX, _rArea.Top() + nSortIndicatorPaddingY),
aIndicatorBitmap);
}
else
{
// text is left-aligned or centered => draw the sort indicator at the right hand side
rRenderContext.DrawBitmapEx(Point(_rArea.Right() - nSortIndicatorPaddingX - aBitmapSize.Width(), nSortIndicatorPaddingY),
rRenderContext.DrawBitmap(Point(_rArea.Right() - nSortIndicatorPaddingX - aBitmapSize.Width(), nSortIndicatorPaddingY),
aIndicatorBitmap);
}
}
+3 -3
View File
@@ -85,7 +85,7 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmap(vcl::PixelFormat aBitmapFormat,bo
Point aPoint((maVDRectangle.GetWidth() / 2.0) - (aBitmapSize.Width() / 2.0),
(maVDRectangle.GetHeight() / 2.0) - (aBitmapSize.Height() / 2.0));
mpVirtualDevice->DrawBitmapEx(aPoint, aBitmap);
mpVirtualDevice->DrawBitmap(aPoint, aBitmap);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
}
@@ -115,7 +115,7 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmapExWithAlpha(vcl::PixelFormat aBitm
Point aPoint(alignToCenter(maVDRectangle, tools::Rectangle(Point(), aBitmapSize)).TopLeft());
mpVirtualDevice->DrawBitmapEx(aPoint, Bitmap(aBitmap, aAlpha));
mpVirtualDevice->DrawBitmap(aPoint, Bitmap(aBitmap, aAlpha));
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
}
@@ -170,7 +170,7 @@ Bitmap OutputDeviceTestBitmap::setupDrawBlend(vcl::PixelFormat aBitmapFormat)
Point aPoint(alignToCenter(maVDRectangle, tools::Rectangle(Point(), aBitmapSize)).TopLeft());
mpVirtualDevice->DrawBitmapEx(aPoint, Bitmap(aBitmap, aAlpha));
mpVirtualDevice->DrawBitmap(aPoint, Bitmap(aBitmap, aAlpha));
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
}
+16 -16
View File
@@ -486,7 +486,7 @@ public:
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
void testDrawBitmapExWithAlpha24bpp()
void testDrawBitmapWithAlpha24bpp()
{
if (getDefaultDeviceBitCount() < 24)
return;
@@ -546,7 +546,7 @@ public:
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
void testDrawBitmapExWithAlpha32bpp()
void testDrawBitmapWithAlpha32bpp()
{
if (getDefaultDeviceBitCount() < 24)
return;
@@ -1138,7 +1138,7 @@ public:
bitmap.Erase(COL_BLUE);
// No alpha, this will actually call SalGraphics::DrawBitmap(), but still check
// the alpha of the device is handled correctly.
device->DrawBitmapEx(Point(2, 2), bitmap);
device->DrawBitmap(Point(2, 2), bitmap);
exportDevice(u"blend_extended_01.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(6, 6)));
@@ -1149,14 +1149,14 @@ public:
device->Erase();
AlphaMask alpha(Size(5, 5));
alpha.Erase(0); // opaque
device->DrawBitmapEx(Point(2, 2), Bitmap(bitmap, alpha));
device->DrawBitmap(Point(2, 2), Bitmap(bitmap, alpha));
exportDevice(u"blend_extended_02.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(6, 6)));
device->Erase();
alpha.Erase(255); // transparent
device->DrawBitmapEx(Point(2, 2), Bitmap(bitmap, alpha));
device->DrawBitmap(Point(2, 2), Bitmap(bitmap, alpha));
exportDevice(u"blend_extended_03.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(6, 6)));
@@ -1169,7 +1169,7 @@ public:
BitmapScopedWriteAccess alphaWrite(alpha);
alphaWrite->SetPixelIndex(0, 0, 255); // opaque
alphaWrite.reset();
device->DrawBitmapEx(Point(2, 2), Bitmap(bitmap, alpha));
device->DrawBitmap(Point(2, 2), Bitmap(bitmap, alpha));
exportDevice(u"blend_extended_04.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(6, 6)));
@@ -1206,16 +1206,16 @@ public:
// alpha 127 will make COL_LIGHTRED -> COL_RED and the same for blue
alpha.Erase(127);
// Normal device.
device->DrawBitmapEx(Point(5, 5), Size(-4, -4), bitmap);
device->DrawBitmapEx(Point(15, 15), Size(4, 4), bitmap);
device->DrawBitmap(Point(5, 5), Size(-4, -4), bitmap);
device->DrawBitmap(Point(15, 15), Size(4, 4), bitmap);
exportDevice(u"draw_alpha_bitmap_mirrored_01.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, device->GetPixel(Point(18, 18)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, device->GetPixel(Point(17, 18)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, device->GetPixel(Point(3, 2)));
device->Erase();
device->DrawBitmapEx(Point(5, 5), Size(-4, -4), Bitmap(bitmap, alpha));
device->DrawBitmapEx(Point(15, 15), Size(4, 4), Bitmap(bitmap, alpha));
device->DrawBitmap(Point(5, 5), Size(-4, -4), Bitmap(bitmap, alpha));
device->DrawBitmap(Point(15, 15), Size(4, 4), Bitmap(bitmap, alpha));
exportDevice(u"draw_alpha_bitmap_mirrored_02.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_RED, device->GetPixel(Point(18, 18)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(17, 18)));
@@ -1223,16 +1223,16 @@ public:
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(3, 2)));
device->Erase();
// Now with alpha device.
alphaDevice->DrawBitmapEx(Point(5, 5), Size(-4, -4), bitmap);
alphaDevice->DrawBitmapEx(Point(15, 15), Size(4, 4), bitmap);
alphaDevice->DrawBitmap(Point(5, 5), Size(-4, -4), bitmap);
alphaDevice->DrawBitmap(Point(15, 15), Size(4, 4), bitmap);
exportDevice(u"draw_alpha_bitmap_mirrored_03.png"_ustr, alphaDevice);
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, alphaDevice->GetPixel(Point(18, 18)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, alphaDevice->GetPixel(Point(17, 18)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, alphaDevice->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, alphaDevice->GetPixel(Point(3, 2)));
alphaDevice->Erase();
alphaDevice->DrawBitmapEx(Point(5, 5), Size(-4, -4), Bitmap(bitmap, alpha));
alphaDevice->DrawBitmapEx(Point(15, 15), Size(4, 4), Bitmap(bitmap, alpha));
alphaDevice->DrawBitmap(Point(5, 5), Size(-4, -4), Bitmap(bitmap, alpha));
alphaDevice->DrawBitmap(Point(15, 15), Size(4, 4), Bitmap(bitmap, alpha));
exportDevice(u"draw_alpha_bitmap_mirrored_04.png"_ustr, alphaDevice);
CPPUNIT_ASSERT_EQUAL(COL_RED, alphaDevice->GetPixel(Point(18, 18)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, alphaDevice->GetPixel(Point(17, 18)));
@@ -1554,7 +1554,7 @@ public:
CPPUNIT_TEST(testDrawBitmap24bpp);
CPPUNIT_TEST(testDrawTransformedBitmap24bpp);
CPPUNIT_TEST(testComplexDrawTransformedBitmap24bpp);
CPPUNIT_TEST(testDrawBitmapExWithAlpha24bpp);
CPPUNIT_TEST(testDrawBitmapWithAlpha24bpp);
CPPUNIT_TEST(testDrawMask24bpp);
CPPUNIT_TEST(testDrawBlend24bpp);
@@ -1562,7 +1562,7 @@ public:
CPPUNIT_TEST(testDrawBitmap32bpp);
CPPUNIT_TEST(testDrawTransformedBitmap32bpp);
CPPUNIT_TEST(testDrawBitmapExWithAlpha32bpp);
CPPUNIT_TEST(testDrawBitmapWithAlpha32bpp);
CPPUNIT_TEST(testDrawMask32bpp);
CPPUNIT_TEST(testDrawBlend32bpp);
@@ -62,7 +62,7 @@ void BitmapRenderTest::testTdf104141()
{
// Noting, for people who may debug this test, that it is not particularly useful.
// The GIF we load is 100% transparent, so we are only actually testing that
// drawing 100% transparent image with DrawBitmapEx() does not change the output.
// drawing 100% transparent image with DrawBitmap() does not change the output.
ScopedVclPtrInstance<VirtualDevice> pVDev;
pVDev->SetOutputSizePixel(Size(400, 400));
pVDev->SetBackground(Wallpaper(COL_GREEN));
@@ -76,7 +76,7 @@ void BitmapRenderTest::testTdf104141()
ErrCode bResult = rFilter.ImportGraphic(aGraphic, aURL, aFileStream);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
Bitmap aBitmap = aGraphic.GetBitmap();
pVDev->DrawBitmapEx(Point(20, 20), aBitmap);
pVDev->DrawBitmap(Point(20, 20), aBitmap);
// Check drawing results: ensure that it contains transparent
// (greenish) pixels
@@ -99,7 +99,7 @@ void BitmapRenderTest::testTdf113918()
ErrCode bResult = rFilter.ImportGraphic(aGraphic, aURL, aFileStream);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
Bitmap aBitmap = aGraphic.GetBitmap();
pVDev->DrawBitmapEx(Point(0, 0), aBitmap);
pVDev->DrawBitmap(Point(0, 0), aBitmap);
// Ensure that image is drawn with white background color from palette
CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(21, 21)));
@@ -159,7 +159,7 @@ void BitmapRenderTest::testDrawAlphaBitmapEx()
CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0x7F, 0x00, 0xFF, 0x00),
aBitmap.GetPixelColor(2, 2));
pVDev->DrawBitmapEx(Point(), aBitmap);
pVDev->DrawBitmap(Point(), aBitmap);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, pVDev->GetPixel(Point(1, 1)));
+3 -3
View File
@@ -136,7 +136,7 @@ void SkiaTest::testDrawShaders()
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(15, 15)));
device->Erase();
device->DrawBitmapEx(Point(5, 5), Bitmap(bitmap, alpha));
device->DrawBitmap(Point(5, 5), Bitmap(bitmap, alpha));
//savePNG("/tmp/a2.png", device);
Color resultRed(COL_RED.GetRed() * 3 / 4 + 64, 64, 64); // 3/4 red, 1/4 white
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(0, 0)));
@@ -175,8 +175,8 @@ void SkiaTest::testDrawShaders()
access.FillRect(tools::Rectangle(Point(20, 40), Size(10, 10)));
}
// Using alpha will still lead to shaders being used.
deviceLarge->DrawBitmapEx(Point(50, 50), Size(60, 60), Point(20, 20), Size(30, 30),
Bitmap(bitmapLarge, alphaLarge));
deviceLarge->DrawBitmap(Point(50, 50), Size(60, 60), Point(20, 20), Size(30, 30),
Bitmap(bitmapLarge, alphaLarge));
//savePNG("/tmp/a4.png", deviceLarge);
Color resultBlue(64, 64, COL_BLUE.GetBlue() * 3 / 4 + 64); // 3/4 blue, 1/4 white
CPPUNIT_ASSERT_EQUAL(COL_WHITE, deviceLarge->GetPixel(Point(40, 40)));
+16 -16
View File
@@ -1133,7 +1133,7 @@ void SvmTest::testBitmapExs()
ScopedVclPtrInstance<VirtualDevice> pVirtualDev;
setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile);
// DrawBitmapEx
// DrawBitmap
{
Bitmap aBitmap(Size(4,4), vcl::PixelFormat::N24_BPP);
{
@@ -1141,30 +1141,30 @@ void SvmTest::testBitmapExs()
pAccess->Erase(COL_YELLOW);
}
pVirtualDev->DrawBitmapEx(Point(1, 1), Bitmap(aBitmap, COL_WHITE));
pVirtualDev->DrawBitmap(Point(1, 1), Bitmap(aBitmap, COL_WHITE));
}
// DrawBitmapEx - Scale
// DrawBitmap - Scale
{
Bitmap aBitmap(Size(4,4), vcl::PixelFormat::N24_BPP);
{
BitmapScopedWriteAccess pAccess(aBitmap);
pAccess->Erase(COL_GREEN);
}
pVirtualDev->DrawBitmapEx(Point(5, 0), Size(2, 3), Bitmap(aBitmap, COL_WHITE));
pVirtualDev->DrawBitmap(Point(5, 0), Size(2, 3), Bitmap(aBitmap, COL_WHITE));
}
// DrawBitmapEx - Scale - Part
// DrawBitmap - Scale - Part
{
Bitmap aBitmap(Size(4,4), vcl::PixelFormat::N24_BPP);
{
BitmapScopedWriteAccess pAccess(aBitmap);
pAccess->Erase(COL_BLUE);
}
pVirtualDev->DrawBitmapEx(Point(7, 1), Size(2, 2), Point(0, 0), Size(3, 4), Bitmap(aBitmap, COL_WHITE));
pVirtualDev->DrawBitmap(Point(7, 1), Size(2, 2), Point(0, 0), Size(3, 4), Bitmap(aBitmap, COL_WHITE));
}
// DrawBitmapEx - 50% transparent
// DrawBitmap - 50% transparent
{
Bitmap aBitmap(Size(4, 4), vcl::PixelFormat::N24_BPP);
AlphaMask aAlpha(Size(4, 4));
@@ -1175,10 +1175,10 @@ void SvmTest::testBitmapExs()
BitmapScopedWriteAccess pAlphaAccess(aAlpha);
pAlphaAccess->Erase(Color(127, 127, 127));
}
pVirtualDev->DrawBitmapEx(Point(6, 6), Bitmap(aBitmap, aAlpha));
pVirtualDev->DrawBitmap(Point(6, 6), Bitmap(aBitmap, aAlpha));
}
// DrawBitmapEx - 1-bit
// DrawBitmap - 1-bit
{
Bitmap aBitmap(Size(2, 2), vcl::PixelFormat::N24_BPP);
{
@@ -1186,10 +1186,10 @@ void SvmTest::testBitmapExs()
pAccess->Erase(COL_MAGENTA);
}
aBitmap.Convert(BmpConversion::N1BitThreshold);
pVirtualDev->DrawBitmapEx(Point(0, 6), Bitmap(aBitmap, COL_WHITE));
pVirtualDev->DrawBitmap(Point(0, 6), Bitmap(aBitmap, COL_WHITE));
}
// DrawBitmapEx - used to be 4-bit
// DrawBitmap - used to be 4-bit
{
Bitmap aBitmap(Size(2, 2), vcl::PixelFormat::N24_BPP);
{
@@ -1197,10 +1197,10 @@ void SvmTest::testBitmapExs()
pAccess->Erase(COL_MAGENTA);
}
aBitmap.Convert(BmpConversion::N8BitColors);
pVirtualDev->DrawBitmapEx(Point(2, 6), Bitmap(aBitmap, COL_WHITE));
pVirtualDev->DrawBitmap(Point(2, 6), Bitmap(aBitmap, COL_WHITE));
}
// DrawBitmapEx - 8-bit Color
// DrawBitmap - 8-bit Color
{
Bitmap aBitmap(Size(2, 2), vcl::PixelFormat::N24_BPP);
{
@@ -1208,10 +1208,10 @@ void SvmTest::testBitmapExs()
pAccess->Erase(COL_MAGENTA);
}
aBitmap.Convert(BmpConversion::N8BitColors);
pVirtualDev->DrawBitmapEx(Point(0, 8), Bitmap(aBitmap, COL_WHITE));
pVirtualDev->DrawBitmap(Point(0, 8), Bitmap(aBitmap, COL_WHITE));
}
// DrawBitmapEx - 8-bit Grey
// DrawBitmap - 8-bit Grey
{
Bitmap aBitmap(Size(2, 2), vcl::PixelFormat::N24_BPP);
{
@@ -1219,7 +1219,7 @@ void SvmTest::testBitmapExs()
pAccess->Erase(COL_MAGENTA);
}
aBitmap.Convert(BmpConversion::N8BitGreys);
pVirtualDev->DrawBitmapEx(Point(2, 8), Bitmap(aBitmap, COL_WHITE));
pVirtualDev->DrawBitmap(Point(2, 8), Bitmap(aBitmap, COL_WHITE));
}
{
+1 -1
View File
@@ -277,7 +277,7 @@ void AnimationRenderer::draw( sal_uLong nIndex, VirtualDevice* pVDev )
mpRestore->DrawOutDev( Point(), maRestSz, aPosPix, aSizePix, *pDev );
}
pDev->DrawBitmapEx( aBmpPosPix, aBmpSizePix, rAnimationFrame.maBitmap );
pDev->DrawBitmap( aBmpPosPix, aBmpSizePix, rAnimationFrame.maBitmap );
if (pVDev)
return;
+2 -2
View File
@@ -1447,8 +1447,8 @@ void SalInstanceWidget::DoRecursivePaint(vcl::Window* pWindow, const Point& rRen
break;
case OUTDEV_PRINTER:
case OUTDEV_PDF:
rOutput.DrawBitmapEx(rRenderLogicPos, aRenderLogicSize,
xOutput->GetBitmap(Point(), aTempLogicSize));
rOutput.DrawBitmap(rRenderLogicPos, aRenderLogicSize,
xOutput->GetBitmap(Point(), aTempLogicSize));
break;
}
+4 -4
View File
@@ -192,7 +192,7 @@ static Bitmap createBitmapFromColorAndAlpha(const Bitmap& rColorBitmap, const Bi
// ScopedVclPtrInstance<VirtualDevice> xDev(DeviceFormat::WITH_ALPHA);
// Size aPixelSize = rBitmapEx.GetSizePixel();
// xDev->SetOutputSizePixel(aPixelSize, /*bErase*/true, /*bAlphaMaskTransparent*/true);
// xDev->DrawBitmapEx(Point(0, 0), aPixelSize, rBitmapEx);
// xDev->DrawBitmap(Point(0, 0), aPixelSize, rBitmapEx);
// mxSalBmp = xDev->GetBitmap(Point(0,0), aPixelSize).mxSalBmp;
}
@@ -2201,13 +2201,13 @@ Color Bitmap::GetAverageColor() const
void Bitmap::Draw( OutputDevice* pOutDev, const Point& rDestPt ) const
{
pOutDev->DrawBitmapEx( rDestPt, *this );
pOutDev->DrawBitmap( rDestPt, *this );
}
void Bitmap::Draw( OutputDevice* pOutDev,
const Point& rDestPt, const Size& rDestSize ) const
{
pOutDev->DrawBitmapEx( rDestPt, rDestSize, *this );
pOutDev->DrawBitmap( rDestPt, rDestSize, *this );
}
AlphaMask Bitmap::CreateAlphaMask() const
@@ -2437,7 +2437,7 @@ Bitmap Bitmap::AutoScaleBitmap(Bitmap const & aBitmap, const tools::Long aStanda
// Draw a rect into virDevice
aVirDevice->DrawRect( aRect );
Point aPointPixel( static_cast<tools::Long>(imgposX), static_cast<tools::Long>(imgposY) );
aVirDevice->DrawBitmapEx( aPointPixel, aRet );
aVirDevice->DrawBitmap( aPointPixel, aRet );
aRet = aVirDevice->GetBitmap( aEmptyPoint, aStdSize );
return aRet;
+2 -2
View File
@@ -696,11 +696,11 @@ void FixedBitmap::ImplDraw( OutputDevice* pDev, const Point& rPos, const Size& r
if ( !maBitmap.IsEmpty() )
{
if ( GetStyle() & WB_SCALE )
pDev->DrawBitmapEx( rPos, rSize, maBitmap );
pDev->DrawBitmap( rPos, rSize, maBitmap );
else
{
Point aPos = lcl_CalcPos( GetStyle(), rPos, maBitmap.GetSizePixel(), rSize );
pDev->DrawBitmapEx( aPos, maBitmap );
pDev->DrawBitmap( aPos, maBitmap );
}
}
}
+2 -2
View File
@@ -1706,7 +1706,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
if (!aBlendFrame.IsEmpty())
{
rRenderContext.DrawBitmapEx(aPtImg, aBlendFrame);
rRenderContext.DrawBitmap(aPtImg, aBlendFrame);
}
}
}
@@ -2724,7 +2724,7 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bLayout)
if(!aBlendFrame.IsEmpty())
{
rRenderContext.DrawBitmapEx(aPtImg, aBlendFrame);
rRenderContext.DrawBitmap(aPtImg, aBlendFrame);
}
}
}
+1 -1
View File
@@ -562,7 +562,7 @@ void ORoadmap::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&
Point aBitmapPos(aMySize.Width() - aBitmapSize.Width(), aMySize.Height() - aBitmapSize.Height());
// draw it
rRenderContext.DrawBitmapEx( aBitmapPos, m_pImpl->getPicture() );
rRenderContext.DrawBitmap( aBitmapPos, m_pImpl->getPicture() );
}
// draw the headline
+1 -1
View File
@@ -377,7 +377,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
pAMTF.reset( new GDIMetaFile );
ScopedVclPtrInstance< VirtualDevice > pTmpVDev;
pAMTF->Record( pTmpVDev );
pTmpVDev->DrawBitmapEx( Point(), aBmp );
pTmpVDev->DrawBitmap( Point(), aBmp );
pAMTF->Stop();
pAMTF->SetPrefSize( aBmp.GetSizePixel() );
pMTF = pAMTF.get();
+2 -2
View File
@@ -140,7 +140,7 @@ static void MakeAsMeta(Graphic &rGraphic)
pVDev->EnableOutput( false );
aMtf.Record( pVDev );
pVDev->DrawBitmapEx( Point(), aSize, rGraphic.GetBitmap() );
pVDev->DrawBitmap( Point(), aSize, rGraphic.GetBitmap() );
aMtf.Stop();
aMtf.WindStart();
aMtf.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
@@ -753,7 +753,7 @@ bool ImportEpsGraphic( SvStream & rStream, Graphic & rGraphic)
pVDev->EnableOutput( false );
aMtf.Record( pVDev );
aSize = OutputDevice::LogicToLogic(aSize, MapMode(), MapMode(MapUnit::Map100thMM));
pVDev->DrawBitmapEx( Point(), aSize, vcl::bitmap::CreateFromData(std::move(aBitmap)) );
pVDev->DrawBitmap( Point(), aSize, vcl::bitmap::CreateFromData(std::move(aBitmap)) );
aMtf.Stop();
aMtf.WindStart();
aMtf.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
+1 -1
View File
@@ -1016,7 +1016,7 @@ void OS2METReader::ReadBitBlt()
while (pB!=nullptr && pB->nID!=nID) pB=pB->pSucc;
if (pB!=nullptr) {
SetRasterOp(aAttr.ePatMix);
pVirDev->DrawBitmapEx(aP1,aSize,pB->aBitmap);
pVirDev->DrawBitmap(aP1,aSize,pB->aBitmap);
}
}
+6 -6
View File
@@ -1824,7 +1824,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode)
tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
}
case 0x0091: { // BitsRgn
@@ -1832,7 +1832,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode)
tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
}
case 0x0092: // Reserved (n Bytes)
@@ -1851,7 +1851,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode)
tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
}
case 0x0099: { // PackBitsRgn
@@ -1859,7 +1859,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode)
tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
}
case 0x009a: { // DirectBitsRect
@@ -1867,7 +1867,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode)
tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, false);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
}
case 0x009b: { // DirectBitsRgn
@@ -1875,7 +1875,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode)
tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, true);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmapEx(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
}
case 0x009c: // Reserved (n Bytes)
+2 -2
View File
@@ -434,9 +434,9 @@ bool GDIMetaFile::ImplPlayWithRenderer(OutputDevice& rOut, const Point& rPos, Si
if( aBitmap.Create( xBitmapCanvas, aSize ) )
{
if (rOut.GetMapMode().GetMapUnit() == MapUnit::MapPixel)
rOut.DrawBitmapEx( rPos, aBitmap );
rOut.DrawBitmap( rPos, aBitmap );
else
rOut.DrawBitmapEx( rPos, rLogicDestSize, aBitmap );
rOut.DrawBitmap( rPos, rLogicDestSize, aBitmap );
return true;
}
}
+1 -1
View File
@@ -65,7 +65,7 @@ void ImplDrawDefault(OutputDevice& rOutDev, const OUString* pText,
if( aSize.Height() > aBitmapSize.Height() && aSize.Width() > aBitmapSize.Width() )
{
rOutDev.DrawBitmapEx( aPoint, *pBitmap );
rOutDev.DrawBitmap( aPoint, *pBitmap );
aPoint.AdjustX(aBitmapSize.Width() + 2*nPixel );
aSize.AdjustWidth( -(aBitmapSize.Width() + 2*nPixel) );
}
+3 -3
View File
@@ -982,7 +982,7 @@ MetaBmpExAction::MetaBmpExAction( const Point& rPt, const Bitmap& rBmp ) :
void MetaBmpExAction::Execute( OutputDevice* pOut )
{
pOut->DrawBitmapEx( maPt, maBmp );
pOut->DrawBitmap( maPt, maBmp );
}
rtl::Reference<MetaAction> MetaBmpExAction::Clone() const
@@ -1018,7 +1018,7 @@ void MetaBmpExScaleAction::Execute( OutputDevice* pOut )
if (!AllowRect(pOut->LogicToPixel(tools::Rectangle(maPt, maSz))))
return;
pOut->DrawBitmapEx( maPt, maSz, maBmp );
pOut->DrawBitmap( maPt, maSz, maBmp );
}
rtl::Reference<MetaAction> MetaBmpExScaleAction::Clone() const
@@ -1058,7 +1058,7 @@ void MetaBmpExScalePartAction::Execute( OutputDevice* pOut )
if (!AllowRect(pOut->LogicToPixel(tools::Rectangle(maDstPt, maDstSz))))
return;
pOut->DrawBitmapEx( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp );
pOut->DrawBitmap( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp );
}
rtl::Reference<MetaAction> MetaBmpExScalePartAction::Clone() const
+1 -1
View File
@@ -167,7 +167,7 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle
}
}
pOutDev->DrawBitmapEx(rPos, aOutSize, aRenderBmp);
pOutDev->DrawBitmap(rPos, aOutSize, aRenderBmp);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+6 -63
View File
@@ -31,63 +31,6 @@
#include <drawmode.hxx>
#include <salgdi.hxx>
void OutputDevice::DrawBitmapEx( const Point& rDestPt,
const Bitmap& rBitmap )
{
assert(!is_double_buffered_window());
if( ImplIsRecordLayout() )
return;
if( !rBitmap.HasAlpha() )
{
DrawBitmap(rDestPt, rBitmap);
return;
}
const Size aSizePx = rBitmap.GetSizePixel();
DrawAlphaBitmap(rDestPt, PixelToLogic(aSizePx), Point(), aSizePx, rBitmap,
MetaActionType::BMPEX);
}
void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Bitmap& rBitmap )
{
assert(!is_double_buffered_window());
if( ImplIsRecordLayout() )
return;
if ( !rBitmap.HasAlpha() )
{
DrawBitmap(rDestPt, rDestSize, rBitmap);
return;
}
DrawAlphaBitmap(rDestPt, rDestSize, Point(), rBitmap.GetSizePixel(),
rBitmap, MetaActionType::BMPEXSCALE);
}
void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap)
{
assert(!is_double_buffered_window());
if( ImplIsRecordLayout() )
return;
if ( !rBitmap.HasAlpha() )
{
DrawBitmap(rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel,
rBitmap);
return;
}
DrawAlphaBitmap(rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel, rBitmap,
MetaActionType::BMPEXSCALEPART);
}
void OutputDevice::DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
Bitmap& rBitmap )
@@ -333,7 +276,7 @@ void OutputDevice::DrawTransformedBitmapEx(
}
// If the backend's implementation is known to not need any optimizations here, pass to it directly.
// With most backends it's more performant to try to simplify to DrawBitmapEx() first.
// With most backends it's more performant to try to simplify to DrawBitmap() first.
if(bTryDirectPaint && mpGraphics->HasFastDrawTransformedBitmap() && DrawTransformBitmapExDirect(aFullTransform, bitmap))
return;
@@ -348,7 +291,7 @@ void OutputDevice::DrawTransformedBitmapEx(
if(!bRotated && !bSheared && !bMirroredX && !bMirroredY)
{
// with no rotation, shear or mirroring it can be mapped to DrawBitmapEx
// with no rotation, shear or mirroring it can be mapped to DrawBitmap
// do *not* execute the mirroring here, it's done in the fallback
// #i124580# the correct DestSize needs to be calculated based on MaxXY values
Point aDestPt(basegfx::fround<tools::Long>(aTranslate.getX()), basegfx::fround<tools::Long>(aTranslate.getY()));
@@ -362,7 +305,7 @@ void OutputDevice::DrawTransformedBitmapEx(
EnableMapMode(false);
}
DrawBitmapEx(aDestPt, aDestSize, bitmap);
DrawBitmap(aDestPt, aDestSize, bitmap);
if (!bMetafile && comphelper::LibreOfficeKit::isActive() && GetMapMode().GetMapUnit() != MapUnit::MapPixel)
{
EnableMapMode();
@@ -378,7 +321,7 @@ void OutputDevice::DrawTransformedBitmapEx(
// take the fallback when no rotate and shear, but mirror (else we would have done this above)
if(!bRotated && !bSheared)
{
// with no rotation or shear it can be mapped to DrawBitmapEx
// with no rotation or shear it can be mapped to DrawBitmap
// do *not* execute the mirroring here, it's done in the fallback
// #i124580# the correct DestSize needs to be calculated based on MaxXY values
const Point aDestPt(basegfx::fround<tools::Long>(aTranslate.getX()), basegfx::fround<tools::Long>(aTranslate.getY()));
@@ -386,7 +329,7 @@ void OutputDevice::DrawTransformedBitmapEx(
basegfx::fround<tools::Long>(aScale.getX() + aTranslate.getX()) - aDestPt.X(),
basegfx::fround<tools::Long>(aScale.getY() + aTranslate.getY()) - aDestPt.Y());
DrawBitmapEx(aDestPt, aDestSize, bitmap);
DrawBitmap(aDestPt, aDestSize, bitmap);
return;
}
@@ -494,7 +437,7 @@ void OutputDevice::DrawTransformedBitmapEx(
basegfx::fround<tools::Long>(aVisibleRange.getMaxX()) - aDestPt.X(),
basegfx::fround<tools::Long>(aVisibleRange.getMaxY()) - aDestPt.Y());
DrawBitmapEx(aDestPt, aDestSize, aTransformed);
DrawBitmap(aDestPt, aDestSize, aTransformed);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
+1 -1
View File
@@ -1082,7 +1082,7 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, to
if ( aWavylinebmp.ImplGetSalBitmap() != nullptr )
{
Size _size( nEndX - nStartX, aWavylinebmp.GetSizePixel().Height() );
DrawBitmapEx(Point( rStartPos.X(), rStartPos.Y() ), PixelToLogic( _size ), Point(), _size, aWavylinebmp);
DrawBitmap(Point( rStartPos.X(), rStartPos.Y() ), PixelToLogic( _size ), Point(), _size, aWavylinebmp);
}
return;
}
+2 -2
View File
@@ -582,7 +582,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
xVDev.disposeAndClear();
// draw masked content to target and restore MapMode
DrawBitmapEx(aDstRect.TopLeft(), Bitmap(aPaint.CreateColorBitmap(), aAlpha));
DrawBitmap(aDstRect.TopLeft(), Bitmap(aPaint.CreateColorBitmap(), aAlpha));
EnableMapMode(bOrigMapModeEnabled);
}
else
@@ -619,7 +619,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
xVDev.disposeAndClear();
EnableMapMode( false );
DrawBitmapEx(aDstRect.TopLeft(), Bitmap(aPaint.CreateColorBitmap(), aAlpha));
DrawBitmap(aDstRect.TopLeft(), Bitmap(aPaint.CreateColorBitmap(), aAlpha));
EnableMapMode( bOldMap );
}
}
+3 -8
View File
@@ -168,7 +168,7 @@ void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY,
ScopedVclPtrInstance< VirtualDevice > aVDev( *this );
aVDev->SetBackground( rWallpaper.GetColor() );
aVDev->SetOutputSizePixel( Size( nBmpWidth, nBmpHeight ) );
aVDev->DrawBitmapEx( Point(), aBmp );
aVDev->DrawBitmap( Point(), aBmp );
aBmp = aVDev->GetBitmap( Point(), aVDev->GetOutputSizePixel() );
}
@@ -312,12 +312,7 @@ void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY,
{
for( tools::Long nBmpX = nStartX; nBmpX <= nRight; nBmpX += nBmpWidth )
{
const Size aSizePx( aBmp.GetSizePixel() );
if( !aBmp.HasAlpha() )
DrawBitmap( Point( nBmpX, nBmpY ), PixelToLogic( aSizePx ), Point(), aSizePx, aBmp, MetaActionType::BMP );
else
DrawAlphaBitmap(Point( nBmpX, nBmpY ), PixelToLogic(aSizePx), Point(), aSizePx, aBmp,
MetaActionType::BMPEX);
DrawBitmap(Point( nBmpX, nBmpY), aBmp);
}
}
bDrawn = true;
@@ -379,7 +374,7 @@ void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY,
}
}
DrawBitmapEx( aPos, aBmp );
DrawBitmap( aPos, aBmp );
}
rWallpaper.ImplSetCachedBitmap( aBmp );
+1 -1
View File
@@ -1402,7 +1402,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags )
pDev->SetLineColor();
if ( aWallpaper.IsBitmap() )
pDev->DrawBitmapEx( aPos, aSize, aWallpaper.GetBitmap() );
pDev->DrawBitmap( aPos, aSize, aWallpaper.GetBitmap() );
else
{
pDev->SetFillColor( aWallpaper.GetColor() );
+1 -1
View File
@@ -1542,7 +1542,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
aMtf.WindStart();
aMtf.Play(*pMaskedDevice);
Bitmap aBmpEx( pMaskedDevice->GetBitmap( Point( 0, 0 ), aPaintRect.GetSize() ) );
i_pTargetOutDev->DrawBitmapEx( i_rPos, aBmpEx );
i_pTargetOutDev->DrawBitmap( i_rPos, aBmpEx );
// get rid of virtual device now so they don't pile up during recursive calls
pMaskedDevice.disposeAndClear();
+1 -1
View File
@@ -180,7 +180,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext,
// currently not sure when using just ::DrawBitmap with
// a defined size or ::DrawOutDev
aPreviewBitmap.Scale(maPreviewSize, BmpScaleFlag::BestQuality);
rRenderContext.DrawBitmapEx(aOffset, aPreviewBitmap);
rRenderContext.DrawBitmap(aOffset, aPreviewBitmap);
}
tools::Rectangle aFrameRect(aOffset + Point(-1, -1), Size(maPreviewSize.Width() + 2, maPreviewSize.Height() + 2));
+1 -1
View File
@@ -175,7 +175,7 @@ void TabPage::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags
pDev->SetLineColor();
if ( aWallpaper.IsBitmap() )
pDev->DrawBitmapEx( aPos, aSize, aWallpaper.GetBitmap() );
pDev->DrawBitmap( aPos, aSize, aWallpaper.GetBitmap() );
else
{
if( aWallpaper.GetColor() == COL_AUTO )
+2 -2
View File
@@ -4404,7 +4404,7 @@ public:
break;
case OUTDEV_PRINTER:
case OUTDEV_PDF:
rOutput.DrawBitmapEx(rPos, xOutput->GetBitmap(Point(), aSize));
rOutput.DrawBitmap(rPos, xOutput->GetBitmap(Point(), aSize));
break;
}
@@ -4839,7 +4839,7 @@ namespace
{
ScopedVclPtr<VirtualDevice> pVDevice(VclPtr<VirtualDevice>::Create());
pVDevice->SetOutputSizePixel(rBitmap.GetSizePixel());
pVDevice->DrawBitmapEx(Point(0,0), rBitmap);
pVDevice->DrawBitmap(Point(0,0), rBitmap);
return getPixbuf(*pVDevice);
}
+11 -11
View File
@@ -840,7 +840,7 @@ public:
aShadowStretch.Scale(Size(aShadowStretch.GetSizePixel().Width(), rSize),
BmpScaleFlag::Fast);
rDev.DrawBitmapEx(aRenderPt, aShadowStretch);
rDev.DrawBitmap(aRenderPt, aShadowStretch);
aRenderPt.Move(aShadowStretch.GetSizePixel().Width() + 4, 0);
}
@@ -856,7 +856,7 @@ public:
rDev.SetFillColor(COL_BLUE);
tools::Rectangle aSurround(r.Center(), aPageShadowMask.GetSizePixel());
rDev.DrawRect(aSurround);
rDev.DrawBitmapEx(aRenderPt, aWhole);
rDev.DrawBitmap(aRenderPt, aWhole);
}
virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
@@ -883,7 +883,7 @@ public:
aBitmap.Scale(r.GetSize(), BmpScaleFlag::BestQuality);
AlphaMask aSemiTransp(aBitmap.GetSizePixel());
aSemiTransp.Erase(64);
rDev.DrawBitmapEx(r.TopLeft(), Bitmap(aBitmap.CreateColorBitmap(),
rDev.DrawBitmap(r.TopLeft(), Bitmap(aBitmap.CreateColorBitmap(),
aSemiTransp));
}
};
@@ -1078,7 +1078,7 @@ public:
else if (eType == RENDER_AS_BITMAPEX)
{
Bitmap aBitmapEx(pNested->GetBitmap(Point(0,0),aWhole.GetSize()));
rDev.DrawBitmapEx(r.TopLeft(), aBitmapEx);
rDev.DrawBitmap(r.TopLeft(), aBitmapEx);
}
else if (eType == RENDER_AS_OUTDEV ||
eType == RENDER_AS_ALPHA_OUTDEV)
@@ -1208,7 +1208,7 @@ public:
// sAL_DEBUG("Draw icon '" << maIconNames[i] << "'");
if (!(i % 4))
rDev.DrawBitmapEx(p, maIcons[i]);
rDev.DrawBitmap(p, maIcons[i]);
else
{
basegfx::B2DHomMatrix aTransform;
@@ -1264,8 +1264,8 @@ public:
aBlack->SetOutputSizePixel(aSrc.GetSizePixel());
aBlack->SetBackground(Wallpaper(COL_BLACK));
aBlack->Erase();
aWhite->DrawBitmapEx(Point(), aSrc);
aBlack->DrawBitmapEx(Point(), aSrc);
aWhite->DrawBitmap(Point(), aSrc);
aBlack->DrawBitmap(Point(), aSrc);
// Now recover that alpha...
Bitmap aWhiteBmp = aWhite->GetBitmap(Point(),aSrc.GetSizePixel());
@@ -1348,7 +1348,7 @@ public:
// original above
Point aAbove(aLocation);
aAbove.Move(0,-aSrc.GetSizePixel().Height() - 4);
rDev.DrawBitmapEx(aAbove, aSrc);
rDev.DrawBitmap(aAbove, aSrc);
aAbove.Move(aSrc.GetSizePixel().Width(),0);
aAbove.Move(aSrc.GetSizePixel().Width(),0);
rDev.DrawBitmap(aAbove, aSrc.CreateColorBitmap());
@@ -1361,18 +1361,18 @@ public:
// result below
Point aBelow(aLocation);
aBelow.Move(0,aResult.GetSizePixel().Height());
rDev.DrawBitmapEx(aBelow, aResult);
rDev.DrawBitmap(aBelow, aResult);
// mini convert test.
aBelow.Move(aResult.GetSizePixel().Width()+4,0);
rDev.DrawBitmapEx(aBelow, aResult);
rDev.DrawBitmap(aBelow, aResult);
Bitmap aGrey = aSrc.CreateColorBitmap();
aGrey.Convert(BmpConversion::N8BitGreys);
rDev.DrawBitmap(aBelow, aGrey);
aBelow.Move(aGrey.GetSizePixel().Width(),0);
rDev.DrawBitmapEx(aBelow, aSrc);
rDev.DrawBitmap(aBelow, aSrc);
aLocation.Move(aSrc.GetSizePixel().Width()*6,0);
if (aLocation.X() > r.Right())