summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-07-22 11:08:22 +0200
committerTomaž Vajngerl <quikee@gmail.com>2016-07-25 14:32:09 +0000
commiteb09e512ae8283f52114c29f4a7d481fa82ab372 (patch)
tree6c5c268862c1f28530f9539783faa7dbe106fdcf /basegfx
parentcb94d2fbd9596aca45d915a599caa671a261c2a2 (diff)
basegfx: initializer_list from polygon
Change-Id: I2d6cdb7189217e1fadb1ecf4e11cf4dd04043ec6 Reviewed-on: https://gerrit.libreoffice.org/27475 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolygon.cxx9
1 files changed, 9 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)
{}