cid#1636693 COPY_INSTEAD_OF_MOVE
[LibreOffice.git] / offapi / com / sun / star / drawing / XSlideRenderer.idl
blob8df410882426f107703be59072255c9d9b1c1790
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 .
21 module com { module sun { module star { module drawing {
23 /** Create preview bitmaps for single slides.
25 interface XSlideRenderer
27 /** Create a preview for the given slide that has the same aspect ratio
28 as the page and is as large as possible but not larger than the
29 specified size.
31 The reason for not using the given size directly as preview size and
32 thus possibly changing the aspect ratio is that
33 a) a different aspect ratio is not used often, and
34 b) leaving the adaptation of the actual preview size (according to the
35 aspect ratio of the slide) to the slide renderer is more convenient
36 to the caller than having to this himself.
38 @param xSlide
39 The slide for which a preview will be created.
40 @param aMaximumPreviewPixelSize
41 The maximum size of the preview measured in pixels. When the
42 aspect ratios of this size and of the given slide differ, then
43 resulting preview will either have the width or the height of
44 this size.
45 @param nSuperSampleFactor
46 When larger than the default 1 then internally a larger preview
47 is created which, before it is returned, is scaled down to the
48 requested size. The intermediate size is nSuperSampleFactor
49 times the original size. Values larger than 1 result in higher
50 memory consumption and longer runtime.
51 This value is an attempt to provide some antialiasing and so to
52 provide more readable slide previews. May become obsolete in
53 the future when true antialiasing support will be integrated.
55 com::sun::star::awt::XBitmap createPreview (
56 [in] XDrawPage xSlide,
57 [in] com::sun::star::awt::Size aMaximumPreviewPixelSize,
58 [in] short nSuperSampleFactor);
60 /** Exactly the same functionality as createPreview(),
61 only a different return type:
62 com::sun::star::rendering::XBitmap instead
63 of com::sun::star::awt::XBitmap.
64 @see createPreview
65 @param xSlide
66 See description in #createPreview.
67 @param aMaximumPreviewPixelSize
68 See description in #createPreview.
69 @param nSuperSampleFactor
70 See description in #createPreview.
71 @param xCanvas
72 This canvas is used create a canvas specific bitmap.
74 com::sun::star::rendering::XBitmap createPreviewForCanvas (
75 [in] XDrawPage xSlide,
76 [in] com::sun::star::awt::Size aMaximumPreviewPixelSize,
77 [in] short nSuperSampleFactor,
78 [in] com::sun::star::rendering::XCanvas xCanvas);
80 /** Return a size that has the given aspect ratio and shares either the
81 width or the height with the given maximum size.
82 @param nSlideAspectRatio
83 The aspect ratio must not be 0.
84 @param aMaximumPreviewPixelSize
85 The maximum size of the returned preview size.
87 com::sun::star::awt::Size calculatePreviewSize (
88 [in] double nSlideAspectRatio,
89 [in] com::sun::star::awt::Size aMaximumPreviewPixelSize);
92 }; }; }; }; // ::com::sun::star::drawing
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */