LCOV - code coverage report
Current view: top level - slideshow/source/inc - slidebitmap.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 1 0.0 %
Date: 2014-11-03 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_SLIDEBITMAP_HXX
      21             : #define INCLUDED_SLIDESHOW_SOURCE_INC_SLIDEBITMAP_HXX
      22             : 
      23             : #include <com/sun/star/uno/Reference.hxx>
      24             : #include <cppcanvas/canvas.hxx>
      25             : #include <cppcanvas/bitmap.hxx>
      26             : 
      27             : #include <basegfx/point/b2dpoint.hxx>
      28             : #include <basegfx/polygon/b2dpolypolygon.hxx>
      29             : 
      30             : #include <boost/shared_ptr.hpp>
      31             : #include <boost/noncopyable.hpp>
      32             : 
      33             : namespace com { namespace sun { namespace star { namespace rendering
      34             : {
      35             :     class XBitmap;
      36             : } } } }
      37             : 
      38             : 
      39             : /* Definition of SlideBitmap class */
      40             : 
      41             : namespace slideshow
      42             : {
      43             :     namespace internal
      44             :     {
      45             : 
      46             :         /** Little wrapper encapsulating an XBitmap
      47             : 
      48             :             This is to insulate us from changes to the preferred
      49             :             transport format for bitmaps (using a sole XBitmap here is
      50             :             a hack, since it is not guaranteed to work, or to work
      51             :             without data loss, across different canvases). And since
      52             :             we don't want to revert to a VCL Bitmap here, have to wait
      53             :             until basegfx bitmap tooling is ready.
      54             : 
      55             :             TODO(F2): Add support for Canvas-independent bitmaps
      56             :             here. Then, Slide::getInitialSlideBitmap and
      57             :             Slide::getFinalSlideBitmap must also be adapted (they no
      58             :             longer need a Canvas ptr, which is actually a hack now).
      59             :          */
      60           0 :         class SlideBitmap : private boost::noncopyable
      61             :         {
      62             :         public:
      63             :             SlideBitmap( const ::cppcanvas::BitmapSharedPtr& rBitmap );
      64             : 
      65             :             bool                draw( const ::cppcanvas::CanvasSharedPtr& rCanvas ) const;
      66             :             ::basegfx::B2ISize  getSize() const;
      67             :             ::basegfx::B2DPoint getOutputPos() const{return maOutputPos;}
      68             :             void                move( const ::basegfx::B2DPoint& rNewPos );
      69             :             void                clip( const ::basegfx::B2DPolyPolygon& rClipPoly );
      70             : 
      71             :             ::com::sun::star::uno::Reference<
      72             :                 ::com::sun::star::rendering::XBitmap >    getXBitmap();
      73             : 
      74             :         private:
      75             :             ::basegfx::B2DPoint                                     maOutputPos;
      76             :             ::basegfx::B2DPolyPolygon                               maClipPoly;
      77             : 
      78             :             // TODO(Q2): Remove UNO bitmap as the transport medium
      79             :             ::com::sun::star::uno::Reference<
      80             :                 ::com::sun::star::rendering::XBitmap >      mxBitmap;
      81             :         };
      82             : 
      83             :         typedef ::boost::shared_ptr< SlideBitmap > SlideBitmapSharedPtr;
      84             :     }
      85             : }
      86             : 
      87             : #endif // INCLUDED_SLIDESHOW_SOURCE_INC_SLIDEBITMAP_HXX
      88             : 
      89             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10