summaryrefslogtreecommitdiff
path: root/drawinglayer/source/tools
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2019-12-04 19:29:38 +1100
committerBartosz Kosiorek <gang65@poczta.onet.pl>2019-12-14 21:06:02 +0100
commit148dba2e6fc68d593f2fb8c1a13a1e811d4504a1 (patch)
treee8e3948c8d86f2276942b21b1a58a4c155c2e5c5 /drawinglayer/source/tools
parentfb24d11ff207d1127dcc16e9a3b5ead6b92c556d (diff)
drawinglayer: improve logging EmfPlusRecordTypeSetInterpolationMode records
Change-Id: I012c9c711e30c39be94cad93b8cadac98645ce71 Reviewed-on: https://gerrit.libreoffice.org/84453 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'drawinglayer/source/tools')
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx19
-rw-r--r--drawinglayer/source/tools/emfphelperdata.hxx14
2 files changed, 32 insertions, 1 deletions
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 72e7e9fa58ca..1c6950d01404 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -79,6 +79,7 @@ namespace emfplushelper
case EmfPlusRecordTypeSetRenderingOrigin: return "EmfPlusRecordTypeSetRenderingOrigin";
case EmfPlusRecordTypeSetAntiAliasMode: return "EmfPlusRecordTypeSetAntiAliasMode";
case EmfPlusRecordTypeSetTextRenderingHint: return "EmfPlusRecordTypeSetTextRenderingHint";
+ case EmfPlusRecordTypeSetTextContrast: return "EmfPlusRectordTypeSetTextContrast";
case EmfPlusRecordTypeSetInterpolationMode: return "EmfPlusRecordTypeSetInterpolationMode";
case EmfPlusRecordTypeSetPixelOffsetMode: return "EmfPlusRecordTypeSetPixelOffsetMode";
case EmfPlusRecordTypeSetCompositingQuality: return "EmfPlusRecordTypeSetCompositingQuality";
@@ -143,6 +144,22 @@ namespace emfplushelper
return "";
}
+ static OUString InterpolationModeToString(sal_uInt16 nMode)
+ {
+ switch (nMode)
+ {
+ case InterpolationMode::InterpolationModeDefault: return "InterpolationModeDefault";
+ case InterpolationMode::InterpolationModeLowQuality: return "InterpolationModeLowQuality";
+ case InterpolationMode::InterpolationModeHighQuality: return "InterpolationModeHighQuality";
+ case InterpolationMode::InterpolationModeBilinear: return "InterpolationModeBilinear";
+ case InterpolationMode::InterpolationModeBicubic: return "InterpolationModeBicubic";
+ case InterpolationMode::InterpolationModeNearestNeighbor: return "InterpolationModeNearestNeighbor";
+ case InterpolationMode::InterpolationModeHighQualityBilinear: return "InterpolationModeHighQualityBilinear";
+ case InterpolationMode::InterpolationModeHighQualityBicubic: return "InterpolationModeHighQualityBicubic";
+ }
+ return "";
+ }
+
EMFPObject::~EMFPObject()
{
}
@@ -1592,6 +1609,8 @@ namespace emfplushelper
}
case EmfPlusRecordTypeSetInterpolationMode:
{
+ sal_uInt16 nInterpolationMode = flags & 0xFF;
+ SAL_INFO("drawinglayer", "EMF+\t Interpolation mode: " << InterpolationModeToString(nInterpolationMode));
SAL_INFO("drawinglayer", "TODO\t EMF+ InterpolationMode");
break;
}
diff --git a/drawinglayer/source/tools/emfphelperdata.hxx b/drawinglayer/source/tools/emfphelperdata.hxx
index 70fa70253380..c29a858e85a7 100644
--- a/drawinglayer/source/tools/emfphelperdata.hxx
+++ b/drawinglayer/source/tools/emfphelperdata.hxx
@@ -64,7 +64,7 @@ namespace emfplushelper
#define EmfPlusRecordTypeSetRenderingOrigin 0x401D
#define EmfPlusRecordTypeSetAntiAliasMode 0x401E
#define EmfPlusRecordTypeSetTextRenderingHint 0x401F
- //TODO EmfPlusSetTextContrast 0x4020
+ #define EmfPlusRecordTypeSetTextContrast 0x4020
#define EmfPlusRecordTypeSetInterpolationMode 0x4021
#define EmfPlusRecordTypeSetPixelOffsetMode 0x4022
//TODO EmfPlusRecordTypeSetCompositingMode 0x4023
@@ -122,6 +122,18 @@ namespace emfplushelper
SmoothingModeAntiAlias8x8 = 0x05
};
+ enum InterpolationMode
+ {
+ InterpolationModeDefault = 0x00,
+ InterpolationModeLowQuality = 0x01,
+ InterpolationModeHighQuality = 0x02,
+ InterpolationModeBilinear = 0x03,
+ InterpolationModeBicubic = 0x04,
+ InterpolationModeNearestNeighbor = 0x05,
+ InterpolationModeHighQualityBilinear = 0x06,
+ InterpolationModeHighQualityBicubic = 0x07
+ };
+
enum TextRenderingHint
{
TextRenderingHintSystemDefault = 0x00,