diff options
author | Radek Doulik <rodo@novell.com> | 2011-11-16 09:23:39 +0100 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2011-11-28 10:23:51 +0100 |
commit | d169860411a7fea060079d8ca27797b10af44732 (patch) | |
tree | d59452e8cdf793077c55359c62fa6b809126578f /cppcanvas/source | |
parent | 5a8fef9b8e3ecc6658c477bdf903fe9e196db596 (diff) |
more debug info for emf+ rendering - path
Diffstat (limited to 'cppcanvas/source')
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index fe5a129d2e26..91c95607a055 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -207,6 +207,7 @@ namespace cppcanvas if ((pPointTypes [i] & 0x07) == 3) { if (((i - last_normal )% 3) == 1) { polygon.setNextControlPoint (p - 1, mapped); + EMFP_DEBUG (printf ("polygon append next: %d mapped: %f,%f\n", p - 1, mapped.getX (), mapped.getY ())); continue; } else if (((i - last_normal) % 3) == 2) { prev = mapped; @@ -217,14 +218,17 @@ namespace cppcanvas last_normal = i; } polygon.append (mapped); + EMFP_DEBUG (printf ("polygon append point: %f,%f mapped: %f,%f\n", pPoints [i*2], pPoints [i*2 + 1], mapped.getX (), mapped.getY ())); if (hasPrev) { polygon.setPrevControlPoint (p, prev); + EMFP_DEBUG (printf ("polygon append prev: %d mapped: %f,%f\n", p, prev.getX (), prev.getY ())); hasPrev = false; } p ++; if (pPointTypes && (pPointTypes [i] & 0x80)) { // closed polygon polygon.setClosed (true); aPolygon.append (polygon); + EMFP_DEBUG (printf ("close polygon\n")); last_normal = i + 1; p = 0; polygon.clear (); @@ -234,6 +238,25 @@ namespace cppcanvas if (polygon.count ()) aPolygon.append (polygon); + EMFP_DEBUG ( + for (unsigned int i=0; i<aPolygon.count(); i++) { + polygon = aPolygon.getB2DPolygon(i); + printf ("polygon: %d\n", i); + for (unsigned int j=0; j<polygon.count(); j++) { + ::basegfx::B2DPoint point = polygon.getB2DPoint(j); + printf ("point: %f,%f\n", point.getX(), point.getY()); + if (polygon.isPrevControlPointUsed(j)) { + point = polygon.getPrevControlPoint(j); + printf ("prev: %f,%f\n", point.getX(), point.getY()); + } + if (polygon.isNextControlPointUsed(j)) { + point = polygon.getNextControlPoint(j); + printf ("next: %f,%f\n", point.getX(), point.getY()); + } + } + } + ); + return aPolygon; } }; |