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.vajng...@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 <c...@libreoffice.org> Reviewed-by: Tomaž Vajngerl <qui...@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
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits