A special filter for generating previews from higher level previews. More...
#include <scalecrop.h>
Public Member Functions | |
ScaleCrop () | |
~ScaleCrop () | |
QuillImage | apply (const QuillImage &image) const |
QSize | newFullImageSize (const QSize &fullImageSize) const |
QRect | newArea (const QSize &fullImageSize, const QRect &area) const |
bool | setOption (const QString &option, const QVariant &value) |
QVariant | option (const QString &option) const |
const QStringList | supportedOptions () const |
virtual const QString | name () const |
QuillImageFilter::QuillFilterRole | role () const |
A special filter for generating previews from higher level previews.
This filter does not work in the general case and should not be available in the default filter factory. The source image must be a full image or a non-cropped preview, the target image should be smaller than the source.
Supports options: SizeAfter (the requested size for the resulting preview), CropRect (the area to be cropped into, in full-screen coordinates - leave unspecified for no cropping).
Default behavior: does nothing.
ScaleCrop::ScaleCrop | ( | ) |
ScaleCrop::~ScaleCrop | ( | ) |
QuillImage ScaleCrop::apply | ( | const QuillImage & | image | ) | const [virtual] |
Applies the filter to a given preview or fragment.
Reimplemented from QuillImageFilterImplementation.
virtual const QString ScaleCrop::name | ( | ) | const [inline, virtual] |
Reimplemented from QuillImageFilterImplementation.
QRect ScaleCrop::newArea | ( | const QSize & | fullImageSize, | |
const QRect & | area | |||
) | const [virtual] |
If the filter changes dimensions of the image, this can be used to re-calculate a new position for a specific tile.
Reimplemented from QuillImageFilterImplementation.
QSize ScaleCrop::newFullImageSize | ( | const QSize & | fullImageSize | ) | const [virtual] |
If the filter changes dimensions of the image, this can be used to re-calculate a new size for the full image.
Reimplemented from QuillImageFilterImplementation.
QVariant ScaleCrop::option | ( | const QString & | filterOption | ) | const [virtual] |
Returns the value of a filter option. These options are the recommended way to pass information to the filters. This function needs to be reimplemented in a derived class to support options.
Reimplemented from QuillImageFilterImplementation.
QuillImageFilter::QuillFilterRole ScaleCrop::role | ( | ) | const [virtual] |
Reimplemented from QuillImageFilterImplementation.
bool ScaleCrop::setOption | ( | const QString & | filterOption, | |
const QVariant & | value | |||
) | [virtual] |
Sets the value of a filter option. These options are the recommended way to pass information to the filters. This function needs to be reimplemented in a derived class to support options.
Reimplemented from QuillImageFilterImplementation.
const QStringList ScaleCrop::supportedOptions | ( | ) | const [virtual] |
Reimplemented from QuillImageFilterImplementation.