summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2013-12-26 19:41:57 +0000
committerAndrzej Hunt <andrzej.hunt@collabora.com>2013-12-27 11:30:36 +0000
commit793f14db156fab0c3e1ef2e19618ae7f8e01d758 (patch)
treeae3e36c000032ac42a028f7bbea997c817ec1598 /cppcanvas
parent6ecea097c5a57f39a4815537fdbde2c9c4140d54 (diff)
EMF+: Add EMFPlusPointR detection to EMFPPath.
Change-Id: Iff1ae9806ee05654762b313ed00ada206e51337f
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 3d1e3ec2bd67..5bea4fccd693 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -167,18 +167,23 @@ namespace cppcanvas
{
for (int i = 0; i < nPoints; i ++) {
if (pathFlags & 0x4000) {
- // points are stored in signed short 16bit integer format
+ // EMFPlusPoint: stored in signed short 16bit integer format
sal_Int16 x, y;
s >> x >> y;
- SAL_INFO ("cppcanvas.emf", "EMF+\tpoint [x,y]: " << x << "," << y);
+ SAL_INFO ("cppcanvas.emf", "EMF+\tEMFPlusPoint [x,y]: " << x << "," << y);
pPoints [i*2] = x;
pPoints [i*2 + 1] = y;
- } else {
- // points are stored in Single (float) format
+ } else if (!(pathFlags & 0xC000)) {
+ // EMFPlusPointF: stored in Single (float) format
s >> pPoints [i*2] >> pPoints [i*2 + 1];
- SAL_INFO ("cppcanvas.emf", "EMF+\tpoint [x,y]: " << pPoints [i*2] << "," << pPoints [i*2 + 1]);
+ SAL_INFO ("cppcanvas.emf", "EMF+\tEMFPlusPointF [x,y]: " << pPoints [i*2] << "," << pPoints [i*2 + 1]);
+ } else { //if (pathFlags & 0x8000)
+ // EMFPlusPointR: points are stored in EMFPlusInteger7 or
+ // EMFPlusInteger15 objects, see section 2.2.2.21/22
+ SAL_INFO("cppcanvas.emf", "EMF+\t\tTODO - parse EMFPlusPointR object (section 2.2.1.6)");
}
+
}
if (pPointTypes)