Branch libreoffice-5-0-4
[LibreOffice.git] / vcl / win / source / gdi / salgdi2.cxx
blobf00945164f3e9cfd9f10de78b021d7f375a09fb2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <string.h>
21 #include <stdlib.h>
23 #include <svsys.h>
24 #include <tools/debug.hxx>
26 #include <win/wincomp.hxx>
27 #include <win/salbmp.h>
28 #include <win/saldata.hxx>
29 #include <win/salids.hrc>
30 #include <win/salgdi.h>
31 #include <win/salframe.h>
33 #include "vcl/salbtype.hxx"
34 #include "vcl/bmpacc.hxx"
35 #include "outdata.hxx"
36 #include "salgdiimpl.hxx"
38 bool WinSalGraphics::supportsOperation( OutDevSupportType eType ) const
40 static bool bAllowForTest(true);
41 bool bRet = false;
43 switch( eType )
45 case OutDevSupport_TransparentRect:
46 bRet = mbVirDev || mbWindow;
47 break;
48 case OutDevSupport_B2DClip:
49 bRet = true;
50 break;
51 case OutDevSupport_B2DDraw:
52 bRet = bAllowForTest;
53 default: break;
55 return bRet;
58 void WinSalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics )
60 mpImpl->copyBits( rPosAry, pSrcGraphics );
63 void WinSalGraphics::copyArea( long nDestX, long nDestY,
64 long nSrcX, long nSrcY,
65 long nSrcWidth, long nSrcHeight,
66 sal_uInt16 nFlags )
68 mpImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY,
69 nSrcWidth, nSrcHeight, nFlags );
72 void WinSalGraphics::drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap)
74 mpImpl->drawBitmap( rPosAry, rSalBitmap );
77 void WinSalGraphics::drawBitmap( const SalTwoRect& rPosAry,
78 const SalBitmap& rSSalBitmap,
79 SalColor nTransparentColor )
81 mpImpl->drawBitmap( rPosAry, rSSalBitmap, nTransparentColor );
84 void WinSalGraphics::drawBitmap( const SalTwoRect& rPosAry,
85 const SalBitmap& rSSalBitmap,
86 const SalBitmap& rSTransparentBitmap )
88 mpImpl->drawBitmap( rPosAry, rSSalBitmap, rSTransparentBitmap );
91 bool WinSalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
92 long nHeight, sal_uInt8 nTransparency )
94 return mpImpl->drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency );
97 void WinSalGraphics::drawMask( const SalTwoRect& rPosAry,
98 const SalBitmap& rSSalBitmap,
99 SalColor nMaskColor )
101 mpImpl->drawMask( rPosAry, rSSalBitmap, nMaskColor );
104 SalBitmap* WinSalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
106 return mpImpl->getBitmap( nX, nY, nDX, nDY );
109 SalColor WinSalGraphics::getPixel( long nX, long nY )
111 return mpImpl->getPixel( nX, nY );
114 void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags )
116 mpImpl->invert( nX, nY, nWidth, nHeight, nFlags );
119 void WinSalGraphics::invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nSalFlags )
121 mpImpl->invert( nPoints, pPtAry, nSalFlags );
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */