2010-10-27 12:53:26 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-11-26 18:20:53 +00:00
|
|
|
|
2014-04-18 22:23:58 +02:00
|
|
|
#ifndef INCLUDED_SLIDESHOW_SOURCE_INC_SLIDEBITMAP_HXX
|
|
|
|
#define INCLUDED_SLIDESHOW_SOURCE_INC_SLIDEBITMAP_HXX
|
2004-11-26 18:20:53 +00:00
|
|
|
|
|
|
|
#include <com/sun/star/uno/Reference.hxx>
|
|
|
|
#include <cppcanvas/canvas.hxx>
|
|
|
|
#include <cppcanvas/bitmap.hxx>
|
|
|
|
|
|
|
|
#include <basegfx/point/b2dpoint.hxx>
|
|
|
|
#include <basegfx/polygon/b2dpolypolygon.hxx>
|
|
|
|
|
2016-02-01 18:53:50 +02:00
|
|
|
#include <memory>
|
2004-11-26 18:20:53 +00:00
|
|
|
|
2005-03-10 12:56:05 +00:00
|
|
|
namespace com { namespace sun { namespace star { namespace rendering
|
2004-11-26 18:20:53 +00:00
|
|
|
{
|
|
|
|
class XBitmap;
|
2005-03-10 12:56:05 +00:00
|
|
|
} } } }
|
2004-11-26 18:20:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Definition of SlideBitmap class */
|
|
|
|
|
2006-12-13 15:03:05 +00:00
|
|
|
namespace slideshow
|
2004-11-26 18:20:53 +00:00
|
|
|
{
|
|
|
|
namespace internal
|
|
|
|
{
|
|
|
|
|
|
|
|
/** Little wrapper encapsulating an XBitmap
|
|
|
|
|
|
|
|
This is to insulate us from changes to the preferred
|
|
|
|
transport format for bitmaps (using a sole XBitmap here is
|
|
|
|
a hack, since it is not guaranteed to work, or to work
|
|
|
|
without data loss, across different canvases). And since
|
|
|
|
we don't want to revert to a VCL Bitmap here, have to wait
|
|
|
|
until basegfx bitmap tooling is ready.
|
|
|
|
|
|
|
|
TODO(F2): Add support for Canvas-independent bitmaps
|
|
|
|
here. Then, Slide::getInitialSlideBitmap and
|
|
|
|
Slide::getFinalSlideBitmap must also be adapted (they no
|
|
|
|
longer need a Canvas ptr, which is actually a hack now).
|
|
|
|
*/
|
2016-04-13 10:07:19 +02:00
|
|
|
class SlideBitmap
|
2004-11-26 18:20:53 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-04-13 10:07:19 +02:00
|
|
|
explicit SlideBitmap( const ::cppcanvas::BitmapSharedPtr& rBitmap );
|
|
|
|
SlideBitmap(const SlideBitmap&) = delete;
|
|
|
|
SlideBitmap& operator=(const SlideBitmap&) = delete;
|
2004-11-26 18:20:53 +00:00
|
|
|
|
|
|
|
bool draw( const ::cppcanvas::CanvasSharedPtr& rCanvas ) const;
|
|
|
|
::basegfx::B2ISize getSize() const;
|
|
|
|
void move( const ::basegfx::B2DPoint& rNewPos );
|
|
|
|
void clip( const ::basegfx::B2DPolyPolygon& rClipPoly );
|
|
|
|
|
2016-04-13 15:38:30 +02:00
|
|
|
const css::uno::Reference< css::rendering::XBitmap >& getXBitmap();
|
2007-11-09 09:19:19 +00:00
|
|
|
|
2004-11-26 18:20:53 +00:00
|
|
|
private:
|
|
|
|
::basegfx::B2DPoint maOutputPos;
|
|
|
|
::basegfx::B2DPolyPolygon maClipPoly;
|
|
|
|
|
|
|
|
// TODO(Q2): Remove UNO bitmap as the transport medium
|
2015-10-29 10:47:45 +02:00
|
|
|
css::uno::Reference< css::rendering::XBitmap > mxBitmap;
|
2004-11-26 18:20:53 +00:00
|
|
|
};
|
|
|
|
|
2016-02-01 18:53:50 +02:00
|
|
|
typedef ::std::shared_ptr< SlideBitmap > SlideBitmapSharedPtr;
|
2004-11-26 18:20:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-18 22:23:58 +02:00
|
|
|
#endif // INCLUDED_SLIDESHOW_SOURCE_INC_SLIDEBITMAP_HXX
|
2010-10-27 12:53:26 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|