diff options
Diffstat (limited to 'src/modules/objects/class_pixmap.cpp')
| -rw-r--r-- | src/modules/objects/class_pixmap.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/objects/class_pixmap.cpp b/src/modules/objects/class_pixmap.cpp index 2b41ab2ec..f207e4532 100644 --- a/src/modules/objects/class_pixmap.cpp +++ b/src/modules/objects/class_pixmap.cpp @@ -52,7 +52,7 @@ Scales the pixmap by sx horizontally and sy vertically. Aspect_ratio values: - IgnoreAspectRatio:the pixmap is scaled ignoring his aspect ratio. - - KeepAspectRatio: pixmap is scaled to a rectangle as large as possible inside size, preserving the aspect ratio.
+ - KeepAspectRatio: pixmap is scaled to a rectangle as large as possible inside size, preserving the aspect ratio. - KeepAspectRatioByExpanding, the pixmap is scaled to a rectangle as small as possible outside size, preserving the aspect ratio. Transformation type values: - Fast: fast transformation but less quality. @@ -137,13 +137,13 @@ bool KviKvsObject_pixmap::functionscale(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("aspect_ratio",KVS_PT_STRING,KVS_PF_OPTIONAL,szAspectRatio) KVSO_PARAMETER("tranformation_type",KVS_PT_STRING,KVS_PF_OPTIONAL,szTransformation) KVSO_PARAMETERS_END(c) - Qt::AspectRatioMode ratio=Qt::IgnoreAspectRatio;
- if (KviQString::equalCI(szAspectRatio,"IgnoreAspectRatio")) ratio=Qt::IgnoreAspectRatio;
- else if (KviQString::equalCI(szAspectRatio,"KeepAspectRatio")) ratio=Qt::KeepAspectRatio;
- else if (KviQString::equalCI(szAspectRatio,"KeepAspectRatioByExpanding")) ratio=Qt::KeepAspectRatioByExpanding;
+ Qt::AspectRatioMode ratio=Qt::IgnoreAspectRatio; + if (KviQString::equalCI(szAspectRatio,"IgnoreAspectRatio")) ratio=Qt::IgnoreAspectRatio; + else if (KviQString::equalCI(szAspectRatio,"KeepAspectRatio")) ratio=Qt::KeepAspectRatio; + else if (KviQString::equalCI(szAspectRatio,"KeepAspectRatioByExpanding")) ratio=Qt::KeepAspectRatioByExpanding; else if (!szAspectRatio.isEmpty())c->warning(__tr2qs("Unknown aspect ratio: using default value IgnoreAspectRatio")); Qt::TransformationMode tmode=Qt::FastTransformation; - if (KviQString::equalCI(szTransformation,"Fast")) tmode=Qt::FastTransformation;
+ if (KviQString::equalCI(szTransformation,"Fast")) tmode=Qt::FastTransformation; else if (KviQString::equalCI(szTransformation,"Smooth")) tmode=Qt::SmoothTransformation; else if (!szAspectRatio.isEmpty())c->warning(__tr2qs("Unknown tranformation mode: using default value Fast")); |
