LibreOffice Module slideshow (master) 1
viewbackgroundshape.hxx
Go to the documentation of this file.
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_ENGINE_SHAPES_VIEWBACKGROUNDSHAPE_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWBACKGROUNDSHAPE_HXX
22
23#include <com/sun/star/uno/Reference.hxx>
24#include <com/sun/star/rendering/XBitmap.hpp>
25
28
29#include <memory>
30
31#include <tools.hxx>
32#include <viewlayer.hxx>
33
34
35namespace slideshow::internal
36 {
44 {
45 public:
56 const ::basegfx::B2DRectangle& rShapeBounds );
61
64 const ViewLayerSharedPtr& getViewLayer() const;
65
66 bool render( const GDIMetaFileSharedPtr& rMtf ) const;
67
68 private:
71 bool prefetch( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
72 const GDIMetaFileSharedPtr& rMtf ) const;
73
77
79 mutable css::uno::Reference< css::rendering::XBitmap > mxBitmap;
80
83
85 mutable ::basegfx::B2DHomMatrix maLastTransformation;
86
87 const ::basegfx::B2DRectangle maBounds;
88 };
89
90 typedef ::std::shared_ptr< ViewBackgroundShape > ViewBackgroundShapeSharedPtr;
91
92}
93
94#endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWBACKGROUNDSHAPE_HXX
95
96/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class is the viewable representation of a draw document's background, associated to a specific V...
ViewBackgroundShape(const ViewBackgroundShape &)=delete
Forbid copy construction.
ViewLayerSharedPtr mpViewLayer
The view layer this object is part of.
css::uno::Reference< css::rendering::XBitmap > mxBitmap
Generated content bitmap, already with correct output size.
mutable::basegfx::B2DHomMatrix maLastTransformation
The canvas, mpRenderer is associated with.
ViewBackgroundShape(ViewLayerSharedPtr xViewLayer, const ::basegfx::B2DRectangle &rShapeBounds)
Create a ViewBackgroundShape for the given View.
bool render(const GDIMetaFileSharedPtr &rMtf) const
ViewBackgroundShape & operator=(const ViewBackgroundShape &)=delete
Forbid copy assignment.
const ViewLayerSharedPtr & getViewLayer() const
Query the associated view layer of this shape.
bool prefetch(const ::cppcanvas::CanvasSharedPtr &rDestinationCanvas, const GDIMetaFileSharedPtr &rMtf) const
Prefetch bitmap for given canvas.
GDIMetaFileSharedPtr mpLastMtf
The last metafile a render object was generated for.
std::shared_ptr< ViewLayer > ViewLayerSharedPtr
Definition: viewlayer.hxx:168
std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr
Definition: tools.hxx:63
::std::shared_ptr< ViewBackgroundShape > ViewBackgroundShapeSharedPtr