1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #include "ogl_canvasbitmap.hxx"
12 #include <canvas/debug.hxx>
13 #include <canvas/canvastools.hxx>
14 #include <tools/diagnose_ex.h>
17 using namespace ::com::sun::star
;
21 CanvasBitmap::CanvasBitmap( const geometry::IntegerSize2D
& rSize
,
22 const SpriteCanvasRef
& rDevice
,
23 SpriteDeviceHelper
& rDeviceHelper
,
26 mbHasAlpha( bHasAlpha
)
28 ENSURE_OR_THROW( mpDevice
.is(),
29 "CanvasBitmap::CanvasBitmap(): Invalid surface or device" );
31 maCanvasHelper
.init( *mpDevice
.get(), rDeviceHelper
, rSize
);
34 CanvasBitmap::CanvasBitmap( const CanvasBitmap
& rSrc
) :
35 mpDevice( rSrc
.mpDevice
),
36 mbHasAlpha( rSrc
.mbHasAlpha
)
38 maCanvasHelper
= rSrc
.maCanvasHelper
;
41 void CanvasBitmap::disposeThis()
46 CanvasBitmapBaseT::disposeThis();
49 bool CanvasBitmap::renderRecordedActions() const
51 return maCanvasHelper
.renderRecordedActions();
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */