Kaydet (Commit) 87fbe86b authored tarafından David Tardon's avatar David Tardon

generalize ScopedBitmapAccess and simplify usage

It can be used for AlphaMask too now.
üst eaea4918
...@@ -1189,8 +1189,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ ) ...@@ -1189,8 +1189,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
// Fill bitmap with generated content // Fill bitmap with generated content
{ {
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(), Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
aBitmap );
for( int y=0; y<aTestSize.getY(); ++y ) for( int y=0; y<aTestSize.getY(); ++y )
for( int x=0; x<aTestSize.getX(); ++x ) for( int x=0; x<aTestSize.getX(); ++x )
pWriteAccess->SetPixel(y,x, pWriteAccess->SetPixel(y,x,
......
...@@ -178,8 +178,7 @@ namespace dxcanvas ...@@ -178,8 +178,7 @@ namespace dxcanvas
Bitmap aBitmap( rBmpEx.GetBitmap() ); Bitmap aBitmap( rBmpEx.GetBitmap() );
ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(), Bitmap::ScopedReadAccess pReadAccess( aBitmap );
aBitmap );
const sal_Int32 nWidth( aBmpSize.Width() ); const sal_Int32 nWidth( aBmpSize.Width() );
const sal_Int32 nHeight( aBmpSize.Height() ); const sal_Int32 nHeight( aBmpSize.Height() );
...@@ -192,8 +191,7 @@ namespace dxcanvas ...@@ -192,8 +191,7 @@ namespace dxcanvas
{ {
Bitmap aAlpha( rBmpEx.GetAlpha().GetBitmap() ); Bitmap aAlpha( rBmpEx.GetAlpha().GetBitmap() );
ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.AcquireReadAccess(), Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha );
aAlpha );
// By convention, the access buffer always has // By convention, the access buffer always has
// one of the following formats: // one of the following formats:
...@@ -335,8 +333,7 @@ namespace dxcanvas ...@@ -335,8 +333,7 @@ namespace dxcanvas
{ {
Bitmap aMask( rBmpEx.GetMask() ); Bitmap aMask( rBmpEx.GetMask() );
ScopedBitmapReadAccess pMaskReadAccess( aMask.AcquireReadAccess(), Bitmap::ScopedReadAccess pMaskReadAccess( aMask );
aMask );
// By convention, the access buffer always has // By convention, the access buffer always has
// one of the following formats: // one of the following formats:
......
...@@ -149,9 +149,8 @@ namespace vclcanvas ...@@ -149,9 +149,8 @@ namespace vclcanvas
Bitmap aBitmap( mpBackBuffer->getBitmapReference().GetBitmap() ); Bitmap aBitmap( mpBackBuffer->getBitmapReference().GetBitmap() );
Bitmap aAlpha( mpBackBuffer->getBitmapReference().GetAlpha().GetBitmap() ); Bitmap aAlpha( mpBackBuffer->getBitmapReference().GetAlpha().GetBitmap() );
ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(), Bitmap::ScopedReadAccess pReadAccess( aBitmap );
aBitmap ); Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
(BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(), (BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(),
aAlpha ); aAlpha );
...@@ -229,9 +228,8 @@ namespace vclcanvas ...@@ -229,9 +228,8 @@ namespace vclcanvas
// actually changed a pixel // actually changed a pixel
{ {
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(), Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
aBitmap ); Bitmap::ScopedWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
ScopedBitmapWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
(BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(), (BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(),
aAlpha ); aAlpha );
...@@ -471,9 +469,8 @@ namespace vclcanvas ...@@ -471,9 +469,8 @@ namespace vclcanvas
// actually changed a pixel // actually changed a pixel
{ {
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(), Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
aBitmap ); Bitmap::ScopedWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
ScopedBitmapWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
(BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(), (BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(),
aAlpha ); aAlpha );
...@@ -525,9 +522,8 @@ namespace vclcanvas ...@@ -525,9 +522,8 @@ namespace vclcanvas
Bitmap aBitmap( mpBackBuffer->getBitmapReference().GetBitmap() ); Bitmap aBitmap( mpBackBuffer->getBitmapReference().GetBitmap() );
Bitmap aAlpha( mpBackBuffer->getBitmapReference().GetAlpha().GetBitmap() ); Bitmap aAlpha( mpBackBuffer->getBitmapReference().GetAlpha().GetBitmap() );
ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(), Bitmap::ScopedReadAccess pReadAccess( aBitmap );
aBitmap ); Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
(BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(), (BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(),
aAlpha ); aAlpha );
ENSURE_OR_THROW( pReadAccess.get() != NULL, ENSURE_OR_THROW( pReadAccess.get() != NULL,
......
...@@ -948,8 +948,7 @@ namespace vclcanvas ...@@ -948,8 +948,7 @@ namespace vclcanvas
Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(), Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(),
aRect.GetSize()) ); aRect.GetSize()) );
ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(), Bitmap::ScopedReadAccess pReadAccess( aBitmap );
aBitmap );
ENSURE_OR_THROW( pReadAccess.get() != NULL, ENSURE_OR_THROW( pReadAccess.get() != NULL,
"Could not acquire read access to OutDev bitmap" ); "Could not acquire read access to OutDev bitmap" );
...@@ -1014,8 +1013,7 @@ namespace vclcanvas ...@@ -1014,8 +1013,7 @@ namespace vclcanvas
Bitmap aTmpBitmap( rOutDev.GetBitmap( aEmptyPoint, Bitmap aTmpBitmap( rOutDev.GetBitmap( aEmptyPoint,
aSize ) ); aSize ) );
ScopedBitmapReadAccess pReadAccess( aTmpBitmap.AcquireReadAccess(), Bitmap::ScopedReadAccess pReadAccess( aTmpBitmap );
aTmpBitmap );
pPalette = &pReadAccess->GetPalette(); pPalette = &pReadAccess->GetPalette();
} }
...@@ -1026,8 +1024,7 @@ namespace vclcanvas ...@@ -1026,8 +1024,7 @@ namespace vclcanvas
bool bCopyBack( false ); // only copy something back, if we bool bCopyBack( false ); // only copy something back, if we
// actually changed some pixel // actually changed some pixel
{ {
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(), Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
aBitmap );
ENSURE_OR_THROW( pWriteAccess.get() != NULL, ENSURE_OR_THROW( pWriteAccess.get() != NULL,
"Could not acquire write access to OutDev bitmap" ); "Could not acquire write access to OutDev bitmap" );
......
...@@ -277,9 +277,8 @@ namespace vclcanvas ...@@ -277,9 +277,8 @@ namespace vclcanvas
aSrcAlpha = rBitmap.GetMask(); aSrcAlpha = rBitmap.GetMask();
} }
ScopedBitmapReadAccess pReadAccess( aSrcBitmap.AcquireReadAccess(), Bitmap::ScopedReadAccess pReadAccess( aSrcBitmap );
aSrcBitmap ); Bitmap::ScopedReadAccess pAlphaReadAccess( rBitmap.IsTransparent() ?
ScopedBitmapReadAccess pAlphaReadAccess( rBitmap.IsTransparent() ?
aSrcAlpha.AcquireReadAccess() : aSrcAlpha.AcquireReadAccess() :
(BitmapReadAccess*)NULL, (BitmapReadAccess*)NULL,
aSrcAlpha ); aSrcAlpha );
...@@ -334,10 +333,8 @@ namespace vclcanvas ...@@ -334,10 +333,8 @@ namespace vclcanvas
// copy-constructing the resulting bitmap. This will // copy-constructing the resulting bitmap. This will
// rule out the possibility that cached accessor data // rule out the possibility that cached accessor data
// is not yet written back. // is not yet written back.
ScopedBitmapWriteAccess pWriteAccess( aDstBitmap.AcquireWriteAccess(), Bitmap::ScopedWriteAccess pWriteAccess( aDstBitmap );
aDstBitmap ); Bitmap::ScopedWriteAccess pAlphaWriteAccess( aDstAlpha );
ScopedBitmapWriteAccess pAlphaWriteAccess( aDstAlpha.AcquireWriteAccess(),
aDstAlpha );
if( pWriteAccess.get() != NULL && if( pWriteAccess.get() != NULL &&
......
...@@ -100,6 +100,11 @@ public: ...@@ -100,6 +100,11 @@ public:
BitmapWriteAccess* AcquireWriteAccess() { return Bitmap::AcquireWriteAccess(); } BitmapWriteAccess* AcquireWriteAccess() { return Bitmap::AcquireWriteAccess(); }
void ReleaseAccess( BitmapReadAccess* pAccess ); void ReleaseAccess( BitmapReadAccess* pAccess );
typedef vcl::ScopedBitmapAccess< BitmapReadAccess, AlphaMask, &AlphaMask::AcquireReadAccess >
ScopedReadAccess;
typedef vcl::ScopedBitmapAccess< BitmapWriteAccess, AlphaMask, &AlphaMask::AcquireWriteAccess >
ScopedWriteAccess;
public: public:
sal_Bool Read( SvStream& rIStm, sal_Bool bFileHeader = sal_True ) { return Bitmap::Read( rIStm, bFileHeader ); } sal_Bool Read( SvStream& rIStm, sal_Bool bFileHeader = sal_True ) { return Bitmap::Read( rIStm, bFileHeader ); }
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <vcl/mapmod.hxx> #include <vcl/mapmod.hxx>
#include <tools/rc.hxx> #include <tools/rc.hxx>
#include <vcl/region.hxx> #include <vcl/region.hxx>
#include <vcl/scopedbitmapaccess.hxx>
// ----------- // -----------
// - Defines - // - Defines -
...@@ -752,6 +753,11 @@ public: ...@@ -752,6 +753,11 @@ public:
BitmapWriteAccess* AcquireWriteAccess(); BitmapWriteAccess* AcquireWriteAccess();
void ReleaseAccess( BitmapReadAccess* pAccess ); void ReleaseAccess( BitmapReadAccess* pAccess );
typedef vcl::ScopedBitmapAccess< BitmapReadAccess, Bitmap, &Bitmap::AcquireReadAccess >
ScopedReadAccess;
typedef vcl::ScopedBitmapAccess< BitmapWriteAccess, Bitmap, &Bitmap::AcquireWriteAccess >
ScopedWriteAccess;
public: public:
sal_Bool Read( SvStream& rIStm, sal_Bool bFileHeader = sal_True, sal_Bool bMSOFormat = sal_False ); sal_Bool Read( SvStream& rIStm, sal_Bool bFileHeader = sal_True, sal_Bool bMSOFormat = sal_False );
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <vcl/salbtype.hxx> #include <vcl/salbtype.hxx>
#include <vcl/bitmap.hxx> #include <vcl/bitmap.hxx>
// -------------------- // --------------------
// - Access defines - // - Access defines -
// -------------------- // --------------------
...@@ -226,72 +225,6 @@ private: ...@@ -226,72 +225,6 @@ private:
BitmapWriteAccess& operator=( const BitmapWriteAccess& ) { return *this; } BitmapWriteAccess& operator=( const BitmapWriteAccess& ) { return *this; }
}; };
// -------------------
// - Accessor Helper -
// -------------------
/** This template handles BitmapAccess the RAII way.
Please don't use directly, but the ready-made typedefs for
BitmapReadAccess and BitmapWriteAccess below.
*/
template < class Access > class ScopedBitmapAccess
{
public:
ScopedBitmapAccess( Access* pAccess,
Bitmap& rBitmap ) :
mpAccess( pAccess ),
mrBitmap( rBitmap )
{
}
~ScopedBitmapAccess()
{
mrBitmap.ReleaseAccess( mpAccess );
}
Access* get() { return mpAccess; }
const Access* get() const { return mpAccess; }
Access* operator->() { return mpAccess; }
const Access* operator->() const { return mpAccess; }
Access& operator*() { return *mpAccess; }
const Access& operator*() const { return *mpAccess; }
private:
Access* mpAccess;
Bitmap& mrBitmap;
};
/** This wrapper handles BitmapReadAccess the RAII way.
Use as follows:
Bitmap aBitmap
ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(), aBitmap );
pReadAccess->SetPixel()...
@attention for practical reasons, ScopedBitmapReadAccess stores a
reference to the provided bitmap, thus, make sure that the bitmap
specified at construction time lives at least as long as the
ScopedBitmapReadAccess.
*/
typedef ScopedBitmapAccess< BitmapReadAccess > ScopedBitmapReadAccess;
/** This wrapper handles BitmapWriteAccess the RAII way.
Use as follows:
Bitmap aBitmap
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(), aBitmap );
pWriteAccess->SetPixel()...
@attention for practical reasons, ScopedBitmapWriteAccess stores a
reference to the provided bitmap, thus, make sure that the bitmap
specified at construction time lives at least as long as the
ScopedBitmapWriteAccess.
*/
typedef ScopedBitmapAccess< BitmapWriteAccess > ScopedBitmapWriteAccess;
// ----------- // -----------
// - Inlines - // - Inlines -
// ----------- // -----------
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef VCL_SCOPEDBITMAPACCESS_HXX_INCLUDED
#define VCL_SCOPEDBITMAPACCESS_HXX_INCLUDED
namespace vcl
{
/** This template handles BitmapAccess the RAII way.
Please don't use directly, but through the ready-made typedefs
ScopedReadAccess and ScopedWriteAccess in classes Bitmap and
AlphaMask.
Use as follows:
Bitmap aBitmap;
Bitmap::ScopedReadAccess pReadAccess( aBitmap );
pReadAccess->SetPixel()...
Bitmap aBitmap2;
Bitmap::ScopedWriteAccess pWriteAccess( bCond ? aBitmap2.AcquireWriteAccess() : 0, aBitmap2 );
if ( pWriteAccess )...
@attention for practical reasons, ScopedBitmapAccess stores a
reference to the provided bitmap, thus, make sure that the bitmap
specified at construction time lives at least as long as the
ScopedBitmapAccess.
*/
template < class Access, class Bitmap, Access* (Bitmap::* Acquire)() > class ScopedBitmapAccess
{
public:
explicit ScopedBitmapAccess( Bitmap& rBitmap ) :
mpAccess( 0 ),
mrBitmap( rBitmap )
{
mpAccess = (mrBitmap.*Acquire)();
}
ScopedBitmapAccess( Access* pAccess, Bitmap& rBitmap ) :
mpAccess( pAccess ),
mrBitmap( rBitmap )
{
}
~ScopedBitmapAccess()
{
mrBitmap.ReleaseAccess( mpAccess );
}
Access* get() { return mpAccess; }
const Access* get() const { return mpAccess; }
Access* operator->() { return mpAccess; }
const Access* operator->() const { return mpAccess; }
Access& operator*() { return *mpAccess; }
const Access& operator*() const { return *mpAccess; }
private:
Access* mpAccess;
Bitmap& mrBitmap;
};
}
#endif // VCL_SCOPEDBITMAPACCESS_HXX_INCLUDED
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -97,6 +97,7 @@ mkdir: %_DEST%\inc%_EXT%\vcl ...@@ -97,6 +97,7 @@ mkdir: %_DEST%\inc%_EXT%\vcl
..\inc\vcl\salgtype.hxx %_DEST%\inc%_EXT%\vcl\salgtype.hxx ..\inc\vcl\salgtype.hxx %_DEST%\inc%_EXT%\vcl\salgtype.hxx
..\inc\vcl\salstype.hxx %_DEST%\inc%_EXT%\vcl\salstype.hxx ..\inc\vcl\salstype.hxx %_DEST%\inc%_EXT%\vcl\salstype.hxx
..\inc\vcl\salnativewidgets.hxx %_DEST%\inc%_EXT%\vcl\salnativewidgets.hxx ..\inc\vcl\salnativewidgets.hxx %_DEST%\inc%_EXT%\vcl\salnativewidgets.hxx
..\inc\vcl\scopedbitmapaccess.hxx %_DEST%\inc%_EXT%\vcl\scopedbitmapaccess.hxx
..\inc\vcl\scrbar.hxx %_DEST%\inc%_EXT%\vcl\scrbar.hxx ..\inc\vcl\scrbar.hxx %_DEST%\inc%_EXT%\vcl\scrbar.hxx
..\inc\vcl\seleng.hxx %_DEST%\inc%_EXT%\vcl\seleng.hxx ..\inc\vcl\seleng.hxx %_DEST%\inc%_EXT%\vcl\seleng.hxx
..\inc\vcl\settings.hxx %_DEST%\inc%_EXT%\vcl\settings.hxx ..\inc\vcl\settings.hxx %_DEST%\inc%_EXT%\vcl\settings.hxx
......
...@@ -220,8 +220,8 @@ namespace vcl ...@@ -220,8 +220,8 @@ namespace vcl
sal_Int32 nHeight, sal_Int32 nHeight,
const rendering::IntegerBitmapLayout& rLayout, const rendering::IntegerBitmapLayout& rLayout,
const uno::Reference< rendering::XIntegerReadOnlyBitmap >& xInputBitmap, const uno::Reference< rendering::XIntegerReadOnlyBitmap >& xInputBitmap,
ScopedBitmapWriteAccess& rWriteAcc, Bitmap::ScopedWriteAccess& rWriteAcc,
ScopedBitmapWriteAccess& rAlphaAcc ) Bitmap::ScopedWriteAccess& rAlphaAcc )
{ {
rendering::IntegerBitmapLayout aCurrLayout; rendering::IntegerBitmapLayout aCurrLayout;
geometry::IntegerRectangle2D aRect; geometry::IntegerRectangle2D aRect;
...@@ -433,9 +433,8 @@ namespace vcl ...@@ -433,9 +433,8 @@ namespace vcl
sal::static_int_cast<sal_uInt16>(1L << nAlphaDepth)) ); sal::static_int_cast<sal_uInt16>(1L << nAlphaDepth)) );
{ // limit scoped access { // limit scoped access
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(), Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
aBitmap ); Bitmap::ScopedWriteAccess pAlphaWriteAccess( nAlphaDepth ? aAlpha.AcquireWriteAccess() : NULL,
ScopedBitmapWriteAccess pAlphaWriteAccess( nAlphaDepth ? aAlpha.AcquireWriteAccess() : NULL,
aAlpha ); aAlpha );
ENSURE_OR_THROW(pWriteAccess.get() != NULL, ENSURE_OR_THROW(pWriteAccess.get() != NULL,
......
...@@ -173,8 +173,7 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp, ...@@ -173,8 +173,7 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
int nDepth = nOriginalDepth; int nDepth = nOriginalDepth;
{ {
ScopedBitmapReadAccess pAcc( aContainedBmp.AcquireReadAccess(), Bitmap::ScopedReadAccess pAcc( aContainedBmp );
aContainedBmp );
nDepth = pAcc->GetBitCount(); nDepth = pAcc->GetBitCount();
} }
...@@ -324,8 +323,7 @@ void checkBitmapImport( const rtl::Reference<VclCanvasBitmap>& xBmp, ...@@ -324,8 +323,7 @@ void checkBitmapImport( const rtl::Reference<VclCanvasBitmap>& xBmp,
int nDepth = nOriginalDepth; int nDepth = nOriginalDepth;
{ {
ScopedBitmapReadAccess pAcc( aContainedBmp.AcquireReadAccess(), Bitmap::ScopedReadAccess pAcc( aContainedBmp );
aContainedBmp );
nDepth = pAcc->GetBitCount(); nDepth = pAcc->GetBitCount();
} }
...@@ -888,8 +886,7 @@ void TestWindow::Paint( const Rectangle& ) ...@@ -888,8 +886,7 @@ void TestWindow::Paint( const Rectangle& )
Bitmap aBitmap(Size(200,200),nDepth); Bitmap aBitmap(Size(200,200),nDepth);
aBitmap.Erase(COL_WHITE); aBitmap.Erase(COL_WHITE);
{ {
ScopedBitmapWriteAccess pAcc(aBitmap.AcquireWriteAccess(), Bitmap::ScopedWriteAccess pAcc(aBitmap);
aBitmap);
if( pAcc.get() ) if( pAcc.get() )
{ {
BitmapColor aBlack(0); BitmapColor aBlack(0);
...@@ -919,8 +916,7 @@ void TestWindow::Paint( const Rectangle& ) ...@@ -919,8 +916,7 @@ void TestWindow::Paint( const Rectangle& )
Bitmap aMask(Size(200,200),1); Bitmap aMask(Size(200,200),1);
aMask.Erase(COL_WHITE); aMask.Erase(COL_WHITE);
{ {
ScopedBitmapWriteAccess pAcc(aMask.AcquireWriteAccess(), Bitmap::ScopedWriteAccess pAcc(aMask);
aMask);
if( pAcc.get() ) if( pAcc.get() )
{ {
pAcc->SetFillColor(COL_BLACK); pAcc->SetFillColor(COL_BLACK);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment