1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_drawing_XSlideRenderer_idl__ 25#define __com_sun_star_drawing_XSlideRenderer_idl__ 26 27#ifndef __com_sun_star_awt_XBitmap_idl__ 28#include <com/sun/star/awt/XBitmap.idl> 29#endif 30#ifndef __com_sun_star_drawing_XDrawPage_idl__ 31#include <com/sun/star/drawing/XDrawPage.idl> 32#endif 33#ifndef __com_sun_star_rendering_XBitmap_idl__ 34#include <com/sun/star/rendering/XBitmap.idl> 35#endif 36#ifndef __com_sun_star_rendering_XSpriteCanvas_idl__ 37#include <com/sun/star/rendering/XSpriteCanvas.idl> 38#endif 39 40 41module com { module sun { module star { module drawing { 42 43/** Create preview bitmaps for single slides. 44*/ 45interface XSlideRenderer 46{ 47 /** Create a preview for the given slide that has the same aspect ratio 48 as the page and is as large as possible but not larger than the 49 specified size. 50 51 The reason for not using the given size directly as preview size and 52 thus possibly changing the aspect ratio is that 53 a) a different aspect ratio is not used often, and 54 b) leaving the adaption of the actual preview size (according to the 55 aspect ratio of the slide) to the slide renderer is more convenient 56 to the caller than having to this himself. 57 58 @param xSlide 59 The slide for which a preview will be created. 60 @param aMaximumPreviewPixelSize 61 The maximum size of the preview measured in pixels. When the 62 aspect ratios of this size and of the given slide differ, then 63 resulting preview will either have the width or the height of 64 this size. 65 @param nSuperSampleFactor 66 When larger than the default 1 then internally a larger preview 67 is created which, before it is returned, is scaled down to the 68 requested size. The intermediate size is nSuperSampleFactor 69 times the original size. Values larger than 1 result in higher 70 memory consumption and longer runtime. 71 This value is an attempt to provide some antialiasing and so to 72 provide more readable slide previews. May become obsolete in 73 the future when true antialiasing suppport will be integrated. 74 */ 75 com::sun::star::awt::XBitmap createPreview ( 76 [in] XDrawPage xSlide, 77 [in] com::sun::star::awt::Size aMaximumPreviewPixelSize, 78 [in] short nSuperSampleFactor); 79 80 /** Exactly the same functionality as <member>createPreview()</member>, 81 only a different return type: 82 <type>com::sun::star::rendering::XBitmap</type> instead 83 of <type>com::sun::star::awt::XBitmap</type>. 84 @see createPreview 85 @param xCanvas 86 This canvas is used create a canvas specific bitmap. 87 */ 88 com::sun::star::rendering::XBitmap createPreviewForCanvas ( 89 [in] XDrawPage xSlide, 90 [in] com::sun::star::awt::Size aMaximumPreviewPixelSize, 91 [in] short nSuperSampleFactor, 92 [in] com::sun::star::rendering::XCanvas xCanvas); 93 94 /** Return a size that has the given aspect ratio and shares either the 95 width or the height with the given maximum size. 96 @param nSlideAspectRatio 97 The aspect ratio must not be 0. 98 @param aMaximumPreviewPixelSize 99 The maximum size of the returned preview size. 100 */ 101 com::sun::star::awt::Size calculatePreviewSize ( 102 [in] double nSlideAspectRatio, 103 [in] com::sun::star::awt::Size aMaximumPreviewPixelSize); 104}; 105 106}; }; }; }; // ::com::sun::star::drawing 107 108#endif 109