summaryrefslogtreecommitdiff
path: root/basegfx/source/matrix/b2dhommatrixtools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/matrix/b2dhommatrixtools.cxx')
-rw-r--r--basegfx/source/matrix/b2dhommatrixtools.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/basegfx/source/matrix/b2dhommatrixtools.cxx b/basegfx/source/matrix/b2dhommatrixtools.cxx
index 0f294d6a262f..0b85ee229ecc 100644
--- a/basegfx/source/matrix/b2dhommatrixtools.cxx
+++ b/basegfx/source/matrix/b2dhommatrixtools.cxx
@@ -29,11 +29,39 @@
#include "precompiled_basegfx.hxx"
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
///////////////////////////////////////////////////////////////////////////////
namespace basegfx
{
+ ::rtl::OUString exportToSvg( const B2DHomMatrix& rMatrix )
+ {
+ rtl::OUStringBuffer aStrBuf;
+ aStrBuf.appendAscii("matrix(");
+
+ aStrBuf.append(rMatrix.get(0,0));
+ aStrBuf.appendAscii(", ");
+
+ aStrBuf.append(rMatrix.get(1,0));
+ aStrBuf.appendAscii(", ");
+
+ aStrBuf.append(rMatrix.get(0,1));
+ aStrBuf.appendAscii(", ");
+
+ aStrBuf.append(rMatrix.get(1,1));
+ aStrBuf.appendAscii(", ");
+
+ aStrBuf.append(rMatrix.get(0,2));
+ aStrBuf.appendAscii(", ");
+
+ aStrBuf.append(rMatrix.get(1,2));
+ aStrBuf.appendAscii(")");
+
+ return aStrBuf.makeStringAndClear();
+ }
+
namespace tools
{
void createSinCosOrthogonal(double& o_rSin, double& o_rCos, double fRadiant)