[Libreoffice-commits] .: writerperfect/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Mon Jan 30 02:34:55 PST 2012
writerperfect/source/filter/OdgGenerator.cxx | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit dc6953f932ffbddd5168f039e58075789b91b98b
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jan 30 11:31:32 2012 +0100
Initial support for quadratic beziers
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 79722e8..6d58aa4 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -858,6 +858,13 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector &path)
qx = (qx < path[k]["svg:x2"]->getDouble()) ? path[k]["svg:x2"]->getDouble() : qx;
qy = (qy < path[k]["svg:y2"]->getDouble()) ? path[k]["svg:y2"]->getDouble() : qy;
}
+ if(path[k]["libwpg:path-action"]->getStr() == "Q")
+ {
+ px = (px > path[k]["svg:x1"]->getDouble()) ? path[k]["svg:x1"]->getDouble() : px;
+ py = (py > path[k]["svg:y1"]->getDouble()) ? path[k]["svg:y1"]->getDouble() : py;
+ qx = (qx < path[k]["svg:x1"]->getDouble()) ? path[k]["svg:x1"]->getDouble() : qx;
+ qy = (qy < path[k]["svg:y1"]->getDouble()) ? path[k]["svg:y1"]->getDouble() : qy;
+ }
if(path[k]["libwpg:path-action"]->getStr() == "A")
{
double xmin, xmax, ymin, ymax;
@@ -924,6 +931,13 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector &path)
(unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
sValue.append(sElement);
}
+ else if (path[i]["libwpg:path-action"]->getStr() == "Q")
+ {
+ sElement.sprintf("Q%i %i %i %i", (unsigned)((path[i]["svg:x1"]->getDouble()-px)*2540),
+ (unsigned)((path[i]["svg:y1"]->getDouble()-py)*2540), (unsigned)((path[i]["svg:x"]->getDouble()-px)*2540),
+ (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
+ sValue.append(sElement);
+ }
else if (path[i]["libwpg:path-action"]->getStr() == "A")
{
sElement.sprintf("A%i %i %i %i %i %i %i", (unsigned)((path[i]["svg:rx"]->getDouble())*2540),
More information about the Libreoffice-commits
mailing list