27 lines
949 B
Diff
27 lines
949 B
Diff
Taken from https://github.com/otfried/ipe-tools/pull/55/commits/65586fcd9cc39e482ae5a9abdb6f4932d9bb88c4
|
|
|
|
diff --git a/pdftoipe/xmloutputdev.cpp b/pdftoipe/xmloutputdev.cpp
|
|
index 291eb5f..17bac2a 100644
|
|
--- a/ipe-tools/pdftoipe/xmloutputdev.cpp
|
|
+++ b/ipe-tools/pdftoipe/xmloutputdev.cpp
|
|
@@ -149,15 +149,15 @@ void XmlOutputDev::stroke(GfxState *state)
|
|
writeColor("<path stroke=", rgb, 0);
|
|
writePSFmt(" pen=\"%g\"", state->getTransformedLineWidth());
|
|
|
|
- double *dash;
|
|
double start;
|
|
- int length, i;
|
|
+ std::vector<double> dash = state->getLineDash(&start);
|
|
+ int length = dash.size();
|
|
+ int i;
|
|
|
|
- state->getLineDash(&dash, &length, &start);
|
|
if (length) {
|
|
writePS(" dash=\"[");
|
|
for (i = 0; i < length; ++i)
|
|
- writePSFmt("%g%s", state->transformWidth(dash[i]),
|
|
+ writePSFmt("%g%s", state->transformWidth(dash.at(i)),
|
|
(i == length-1) ? "" : " ");
|
|
writePSFmt("] %g\"", state->transformWidth(start));
|
|
}
|