Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: drawing ::

unpublished interface XSlideRenderer
Usage Restrictions
not published
Description
Create preview bitmaps for single slides.

Methods' Summary
createPreview Create a preview for the given slide that has the same aspect ratio as the page and is as large as possible but not larger than the specified size. The reason for not using the given size directly as preview size and thus possibly changing the aspect ratio is that a) a different aspect ratio is not used often, and b) leaving the adaption of the actual preview size (according to the aspect ratio of the slide) to the slide renderer is more convenient to the caller than having to this himself.  
createPreviewForCanvas Exactly the same functionality as createPreview(), only a different return type: com::sun::star::rendering::XBitmap instead of com::sun::star::awt::XBitmap.  
calculatePreviewSize Return a size that has the given aspect ratio and shares either the width or the height with the given maximum size.  
Methods' Details
createPreview
::com::sun::star::awt::XBitmap
createPreview( [in] XDrawPage  xSlide,
[in] ::com::sun::star::awt::Size  aMaximumPreviewPixelSize,
[in] short  nSuperSampleFactor );

Description
Create a preview for the given slide that has the same aspect ratio as the page and is as large as possible but not larger than the specified size. The reason for not using the given size directly as preview size and thus possibly changing the aspect ratio is that a) a different aspect ratio is not used often, and b) leaving the adaption of the actual preview size (according to the aspect ratio of the slide) to the slide renderer is more convenient to the caller than having to this himself.
Parameter xSlide
The slide for which a preview will be created.
Parameter aMaximumPreviewPixelSize
The maximum size of the preview measured in pixels. When the aspect ratios of this size and of the given slide differ, then resulting preview will either have the width or the height of this size.
Parameter nSuperSampleFactor
When larger than the default 1 then internally a larger preview is created which, before it is returned, is scaled down to the requested size. The intermediate size is nSuperSampleFactor times the original size. Values larger than 1 result in higher memory consumption and longer runtime. This value is an attempt to provide some antialiasing and so to provide more readable slide previews. May become obsolete in the future when true antialiasing suppport will be integrated.
createPreviewForCanvas
::com::sun::star::rendering::XBitmap
createPreviewForCanvas( [in] XDrawPage  xSlide,
[in] ::com::sun::star::awt::Size  aMaximumPreviewPixelSize,
[in] short  nSuperSampleFactor,
[in] ::com::sun::star::rendering::XCanvas  xCanvas );

Description
Exactly the same functionality as createPreview(), only a different return type: com::sun::star::rendering::XBitmap instead of com::sun::star::awt::XBitmap.
Parameter xCanvas
This canvas is used create a canvas specific bitmap.
See also
createPreview
calculatePreviewSize
::com::sun::star::awt::Size
calculatePreviewSize( [in] double  nSlideAspectRatio,
[in] ::com::sun::star::awt::Size  aMaximumPreviewPixelSize );

Description
Return a size that has the given aspect ratio and shares either the width or the height with the given maximum size.
Parameter nSlideAspectRatio
The aspect ratio must not be 0.
Parameter aMaximumPreviewPixelSize
The maximum size of the returned preview size.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.