From 3bebf2401598f8cfa2d80040025ef254c4d89ba9 Mon Sep 17 00:00:00 2001 From: Jon Evans <jon@craftyjon.com> Date: Sat, 4 Jan 2025 08:41:53 -0500 Subject: [PATCH] Add another SWIG wrapper for BOX2I Fixes https://gitlab.com/kicad/code/kicad/-/issues/19485 --- common/swig/math.i | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/swig/math.i b/common/swig/math.i index dc485de1bc..6f4f240897 100644 --- a/common/swig/math.i +++ b/common/swig/math.i @@ -49,6 +49,14 @@ %template(VECTOR3D) VECTOR3<double>; %template(BOX2I) BOX2<VECTOR2I>; +%extend BOX2<VECTOR2I> +{ + BOX2I(const VECTOR2I& aPos, const VECTOR2I& aSize) + { + return new BOX2I(aPos, aSize); + } +} + %extend VECTOR2<int> { void Set(long x, long y) { self->x = x; self->y = y; }