LibreOffice
LibreOffice 7.4 SDK API Reference
Public Member Functions | List of all members
XSlideRenderer Interface Reference

Create preview bitmaps for single slides. More...

import"XSlideRenderer.idl";

Inheritance diagram for XSlideRenderer:
SlideRenderer

Public Member Functions

com::sun::star::awt::XBitmap createPreview ([in] XDrawPage xSlide, [in] com::sun::star::awt::Size aMaximumPreviewPixelSize, [in] short nSuperSampleFactor)
 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. More...
 
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)
 Exactly the same functionality as createPreview(), only a different return type: com::sun::star::rendering::XBitmap instead of com::sun::star::awt::XBitmap. More...
 
com::sun::star::awt::Size calculatePreviewSize ([in] double nSlideAspectRatio, [in] com::sun::star::awt::Size aMaximumPreviewPixelSize)
 Return a size that has the given aspect ratio and shares either the width or the height with the given maximum size. More...
 

Detailed Description

Create preview bitmaps for single slides.

Member Function Documentation

◆ calculatePreviewSize()

com::sun::star::awt::Size calculatePreviewSize ( [in] double  nSlideAspectRatio,
[in] com::sun::star::awt::Size  aMaximumPreviewPixelSize 
)

Return a size that has the given aspect ratio and shares either the width or the height with the given maximum size.

Parameters
nSlideAspectRatioThe aspect ratio must not be 0.
aMaximumPreviewPixelSizeThe maximum size of the returned preview size.

◆ createPreview()

com::sun::star::awt::XBitmap createPreview ( [in] XDrawPage  xSlide,
[in] com::sun::star::awt::Size  aMaximumPreviewPixelSize,
[in] short  nSuperSampleFactor 
)

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 adaptation 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.

Parameters
xSlideThe slide for which a preview will be created.
aMaximumPreviewPixelSizeThe 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.
nSuperSampleFactorWhen 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 support 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 
)

Exactly the same functionality as createPreview(), only a different return type: com::sun::star::rendering::XBitmap instead of com::sun::star::awt::XBitmap.

See also
createPreview
Parameters
xSlideSee description in createPreview.
aMaximumPreviewPixelSizeSee description in createPreview.
nSuperSampleFactorSee description in createPreview.
xCanvasThis canvas is used create a canvas specific bitmap.

The documentation for this interface was generated from the following file: