diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-23 11:47:09 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-23 23:28:41 +0200 |
commit | 0378bfcea51ff0f379d0954aa6740f1829909dc3 (patch) | |
tree | 5d1695806fbf30fb0a71392dc8cf92c526dac574 /include | |
parent | 7a46940d0a8782ed40b7e8182d883b02eb69bc40 (diff) |
Constify VirtDevice::me(Alpha)?Format
Change-Id: I619c19837c3bb6124009787ba0fc53991b4c4d0b
Reviewed-on: https://gerrit.libreoffice.org/62256
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/virdev.hxx | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx index 06121aca050a..f608b5797844 100644 --- a/include/vcl/virdev.hxx +++ b/include/vcl/virdev.hxx @@ -50,12 +50,12 @@ private: VclPtr<VirtualDevice> mpNext; sal_uInt16 mnBitCount; bool mbScreenComp; - DeviceFormat meFormat; - DeviceFormat meAlphaFormat; + const DeviceFormat meFormat; + const DeviceFormat meAlphaFormat; RefDevMode meRefDevMode; bool mbForceZeroExtleadBug; - SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ); + SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, const SystemGraphicsData *pData = nullptr ); SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase, sal_uInt8* pBuffer ); SAL_DLLPRIVATE bool ImplSetOutputSizePixel( const Size& rNewSize, bool bErase, @@ -74,6 +74,24 @@ protected: virtual bool AcquireGraphics() const override; virtual void ReleaseGraphics( bool bRelease = true ) override; + /** Create a virtual device of size 1x1 + + @param pCompDev + The generated vdev will be compatible to this device. + If it's the nullptr, it uses Application::GetDefaultDevice(). + + @param eFormat + Device format of the generated virtual device. Use DeviceFormat::DEFAULT here, to + indicate: take default screen depth. Only DeviceFormat::BITMASK + is the other possibility to denote a binary mask. + + @param eAlphaFormat + Device format of the generated virtual device. Use DeviceFormat::DEFAULT here, to + indicate: take default screen depth. Only DeviceFormat::BITMASK + is the other possibility to denote a binary mask. + */ + explicit VirtualDevice(const OutputDevice* pCompDev, DeviceFormat eFormat, DeviceFormat eAlphaFormat); + public: /** Create a virtual device of size 1x1 @@ -83,7 +101,8 @@ public: indicate: take default screen depth. Only DeviceFormat::BITMASK is the other possibility to denote a binary mask. */ - explicit VirtualDevice(DeviceFormat eFormat = DeviceFormat::DEFAULT); + explicit VirtualDevice(DeviceFormat eFormat = DeviceFormat::DEFAULT) + : VirtualDevice(nullptr, eFormat, DeviceFormat::NONE) {} /** Create a virtual device of size 1x1 @@ -95,8 +114,9 @@ public: indicate: take default screen depth. Only DeviceFormat::BITMASK is the other possibility to denote a binary mask. */ - explicit VirtualDevice(const OutputDevice& rCompDev, - DeviceFormat eFormat = DeviceFormat::DEFAULT); + explicit VirtualDevice(const OutputDevice& rCompDev, + DeviceFormat eFormat = DeviceFormat::DEFAULT) + : VirtualDevice(&rCompDev, eFormat, DeviceFormat::NONE) {} /** Create a virtual device of size 1x1 with alpha channel @@ -113,15 +133,16 @@ public: indicate: take default screen depth. Only DeviceFormat::BITMASK is the other possibility to denote a binary mask. */ - explicit VirtualDevice( const OutputDevice& rCompDev, - DeviceFormat eFormat, DeviceFormat eAlphaFormat); + explicit VirtualDevice(const OutputDevice& rCompDev, + DeviceFormat eFormat, DeviceFormat eAlphaFormat) + : VirtualDevice(&rCompDev, eFormat, eAlphaFormat) {} /** Create a virtual device using an existing system dependent device or graphics context Any rendering will happen directly on the context and not on any intermediate bitmap. Note: This might not be supported on all platforms ! - */ - explicit VirtualDevice(const SystemGraphicsData *pData, const Size &rSize, - DeviceFormat eFormat); + */ + explicit VirtualDevice(const SystemGraphicsData *pData, const Size &rSize, + DeviceFormat eFormat); virtual ~VirtualDevice() override; virtual void dispose() override; |