LibreOffice Module sd (master) 1
Public Member Functions | Protected Member Functions | List of all members
sd::slidesorter::cache::BitmapCompressor Class Referenceabstract

This interface class provides the minimal method set for classes that implement the compression and decompression of preview bitmaps. More...

#include <SlsBitmapCompressor.hxx>

Inheritance diagram for sd::slidesorter::cache::BitmapCompressor:
[legend]

Public Member Functions

virtual std::shared_ptr< BitmapReplacementCompress (const BitmapEx &rBitmap) const =0
 Compress the given bitmap into a replacement format that is specific to the compressor class. More...
 
virtual BitmapEx Decompress (const BitmapReplacement &rBitmapData) const =0
 Decompress the given replacement data into a preview bitmap. More...
 
virtual bool IsLossless () const =0
 Return whether the compression and decompression is lossless. More...
 

Protected Member Functions

 ~BitmapCompressor ()
 

Detailed Description

This interface class provides the minimal method set for classes that implement the compression and decompression of preview bitmaps.

Definition at line 34 of file SlsBitmapCompressor.hxx.

Constructor & Destructor Documentation

◆ ~BitmapCompressor()

sd::slidesorter::cache::BitmapCompressor::~BitmapCompressor ( )
inlineprotected

Definition at line 58 of file SlsBitmapCompressor.hxx.

Member Function Documentation

◆ Compress()

virtual std::shared_ptr< BitmapReplacement > sd::slidesorter::cache::BitmapCompressor::Compress ( const BitmapEx rBitmap) const
pure virtual

Compress the given bitmap into a replacement format that is specific to the compressor class.

Implemented in sd::slidesorter::cache::CompressionByDeletion, sd::slidesorter::cache::PngCompression, sd::slidesorter::cache::NoBitmapCompression, and sd::slidesorter::cache::ResolutionReduction.

◆ Decompress()

virtual BitmapEx sd::slidesorter::cache::BitmapCompressor::Decompress ( const BitmapReplacement rBitmapData) const
pure virtual

Decompress the given replacement data into a preview bitmap.

Depending on the compression technique the returned bitmap may differ from the original bitmap given to the Compress() method. It may even of the wrong size or empty or the NULL pointer. It is the task of the caller to create a new preview bitmap if the returned one is not as desired.

Implemented in sd::slidesorter::cache::NoBitmapCompression, sd::slidesorter::cache::CompressionByDeletion, sd::slidesorter::cache::ResolutionReduction, and sd::slidesorter::cache::PngCompression.

◆ IsLossless()

virtual bool sd::slidesorter::cache::BitmapCompressor::IsLossless ( ) const
pure virtual

Return whether the compression and decompression is lossless.

This value is used by the caller of Decompress() to decide whether to use the returned bitmap as is or if a new preview has to be created.

Implemented in sd::slidesorter::cache::NoBitmapCompression, sd::slidesorter::cache::CompressionByDeletion, sd::slidesorter::cache::ResolutionReduction, and sd::slidesorter::cache::PngCompression.


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