fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / slideshow / source / inc / slidebitmap.hxx
blobcf57729899136d6f37baf41ac9846cf426483b33
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_SLIDEBITMAP_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_INC_SLIDEBITMAP_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <cppcanvas/canvas.hxx>
25 #include <cppcanvas/bitmap.hxx>
27 #include <basegfx/point/b2dpoint.hxx>
28 #include <basegfx/polygon/b2dpolypolygon.hxx>
30 #include <boost/shared_ptr.hpp>
31 #include <boost/noncopyable.hpp>
33 namespace com { namespace sun { namespace star { namespace rendering
35 class XBitmap;
36 } } } }
39 /* Definition of SlideBitmap class */
41 namespace slideshow
43 namespace internal
46 /** Little wrapper encapsulating an XBitmap
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.
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).
60 class SlideBitmap : private boost::noncopyable
62 public:
63 SlideBitmap( const ::cppcanvas::BitmapSharedPtr& rBitmap );
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 );
71 ::com::sun::star::uno::Reference<
72 ::com::sun::star::rendering::XBitmap > getXBitmap();
74 private:
75 ::basegfx::B2DPoint maOutputPos;
76 ::basegfx::B2DPolyPolygon maClipPoly;
78 // TODO(Q2): Remove UNO bitmap as the transport medium
79 ::com::sun::star::uno::Reference<
80 ::com::sun::star::rendering::XBitmap > mxBitmap;
83 typedef ::boost::shared_ptr< SlideBitmap > SlideBitmapSharedPtr;
87 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_SLIDEBITMAP_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */