[Libreoffice-commits] core.git: basegfx/source include/basegfx
Tomaž Vajngerl
tomaz.vajngerl at collabora.com
Mon Jul 25 14:32:38 UTC 2016
basegfx/source/polygon/b2dpolygon.cxx | 9 +++++++++
include/basegfx/polygon/b2dpolygon.hxx | 2 ++
2 files changed, 11 insertions(+)
New commits:
commit eb09e512ae8283f52114c29f4a7d481fa82ab372
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date: Fri Jul 22 11:08:22 2016 +0200
basegfx: initializer_list from polygon
Change-Id: I2d6cdb7189217e1fadb1ecf4e11cf4dd04043ec6
Reviewed-on: https://gerrit.libreoffice.org/27475
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx
index 5ad06ea..4274e62 100644
--- a/basegfx/source/polygon/b2dpolygon.cxx
+++ b/basegfx/source/polygon/b2dpolygon.cxx
@@ -1105,6 +1105,15 @@ namespace basegfx
: mpPolygon(DefaultPolygon::get())
{}
+ B2DPolygon::B2DPolygon(std::initializer_list<basegfx::B2DPoint> aPoints)
+ : mpPolygon(DefaultPolygon::get())
+ {
+ for (const basegfx::B2DPoint& rPoint : aPoints)
+ {
+ append(rPoint);
+ }
+ }
+
B2DPolygon::B2DPolygon(const B2DPolygon& rPolygon)
: mpPolygon(rPolygon.mpPolygon)
{}
diff --git a/include/basegfx/polygon/b2dpolygon.hxx b/include/basegfx/polygon/b2dpolygon.hxx
index 6ef7693..7bdf771 100644
--- a/include/basegfx/polygon/b2dpolygon.hxx
+++ b/include/basegfx/polygon/b2dpolygon.hxx
@@ -55,6 +55,8 @@ namespace basegfx
B2DPolygon();
B2DPolygon(const B2DPolygon& rPolygon);
B2DPolygon(const B2DPolygon& rPolygon, sal_uInt32 nIndex, sal_uInt32 nCount);
+ B2DPolygon(std::initializer_list<basegfx::B2DPoint> rPoints);
+
~B2DPolygon();
/// assignment operator
More information about the Libreoffice-commits
mailing list