diff options
-rw-r--r-- | basegfx/source/polygon/b2dpolygon.cxx | 9 | ||||
-rw-r--r-- | include/basegfx/polygon/b2dpolygon.hxx | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx index 5ad06eaedb57..4274e629581b 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 6ef76933eebe..7bdf771915f3 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 |