Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / drawing / XSlideRenderer.idl
blobfadcc9887c7aa445bc5dacd33460716aa6aed9f9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XSlideRenderer.idl,v $
11 * $Revision: 1.3 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef __com_sun_star_drawing_XSlideRenderer_idl__
33 #define __com_sun_star_drawing_XSlideRenderer_idl__
35 #ifndef __com_sun_star_awt_XBitmap_idl__
36 #include <com/sun/star/awt/XBitmap.idl>
37 #endif
38 #ifndef __com_sun_star_drawing_XDrawPage_idl__
39 #include <com/sun/star/drawing/XDrawPage.idl>
40 #endif
41 #ifndef __com_sun_star_rendering_XBitmap_idl__
42 #include <com/sun/star/rendering/XBitmap.idl>
43 #endif
44 #ifndef __com_sun_star_rendering_XSpriteCanvas_idl__
45 #include <com/sun/star/rendering/XSpriteCanvas.idl>
46 #endif
49 module com { module sun { module star { module drawing {
51 /** Create preview bitmaps for single slides.
53 interface XSlideRenderer
55 /** Create a preview for the given slide that has the same aspect ratio
56 as the page and is as large as possible but not larger than the
57 specified size.
59 The reason for not using the given size directly as preview size and
60 thus possibly changing the aspect ratio is that
61 a) a different aspect ratio is not used often, and
62 b) leaving the adaption of the actual preview size (according to the
63 aspect ratio of the slide) to the slide renderer is more convenient
64 to the caller than having to this himself.
66 @param xSlide
67 The slide for which a preview will be created.
68 @param aMaximumPreviewPixelSize
69 The maximum size of the preview measured in pixels. When the
70 aspect ratios of this size and of the given slide differ, then
71 resulting preview will either have the width or the height of
72 this size.
73 @param nSuperSampleFactor
74 When larger than the default 1 then internally a larger preview
75 is created which, before it is returned, is scaled down to the
76 requested size. The intermediate size is nSuperSampleFactor
77 times the original size. Values larger than 1 result in higher
78 memory consumption and longer runtime.
79 This value is an attempt to provide some antialiasing and so to
80 provide more readable slide previews. May become obsolete in
81 the future when true antialiasing suppport will be integrated.
83 com::sun::star::awt::XBitmap createPreview (
84 [in] XDrawPage xSlide,
85 [in] com::sun::star::awt::Size aMaximumPreviewPixelSize,
86 [in] short nSuperSampleFactor);
88 /** Exactly the same functionality as <member>createPreview()</member>,
89 only a different return type:
90 <type>com::sun::star::rendering::XBitmap</type> instead
91 of <type>com::sun::star::awt::XBitmap</type>.
92 @see createPreview
93 @param xCanvas
94 This canvas is used create a canvas specific bitmap.
96 com::sun::star::rendering::XBitmap createPreviewForCanvas (
97 [in] XDrawPage xSlide,
98 [in] com::sun::star::awt::Size aMaximumPreviewPixelSize,
99 [in] short nSuperSampleFactor,
100 [in] com::sun::star::rendering::XCanvas xCanvas);
102 /** Return a size that has the given aspect ratio and shares either the
103 width or the height with the given maximum size.
104 @param nSlideAspectRatio
105 The aspect ratio must not be 0.
106 @param aMaximumPreviewPixelSize
107 The maximum size of the returned preview size.
109 com::sun::star::awt::Size calculatePreviewSize (
110 [in] double nSlideAspectRatio,
111 [in] com::sun::star::awt::Size aMaximumPreviewPixelSize);
114 }; }; }; }; // ::com::sun::star::drawing
116 #endif