summaryrefslogtreecommitdiff
path: root/drawinglayer/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/README.md')
-rw-r--r--drawinglayer/README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/drawinglayer/README.md b/drawinglayer/README.md
index 04ebcadf0b17..9eb7057d2a37 100644
--- a/drawinglayer/README.md
+++ b/drawinglayer/README.md
@@ -82,3 +82,20 @@ printing), etc.
above)
* Custom widgets (like the Header / Footer indicator button)
+
+## Dumping DrawingLayer Primitives as XML
+
+For debugging purposes, it is possible to dump the drawinglayer primitives as
+an xml file. The drawinglayer xml dump can show possible problems with the
+rendering.
+
+For example, in `emfio/qa/cppunit/emf/EmfImportTest.cxx`, one can write:
+
+ Primitive2DSequence aSequence = parseEmf(u"emfio/qa/cppunit/wmf/data/stockobject.emf");
+ drawinglayer::Primitive2dXmlDump dumper;
+ Primitive2DContainer aContainer(aSequence);
+ dumper.dump(aContainer, "/tmp/drawyinglayer.xml");
+
+Then, after invoking `make CppunitTest_emfio_emf`, `/tmp/drawyinglayer.xml` will
+be the dump of the drawinglayer primitives used to draw the emf file in
+LibreOffice. The top level tag will be <primitive2D>.