summaryrefslogtreecommitdiff
path: root/include/basegfx/tuple/Tuple2D.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-11 20:36:20 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-12 09:55:48 +0100
commit3c1ab4940914ba07c8cb61d13e03a319f73fce7c (patch)
treec2f33173f90bcf279acf6c359feea0cfb849f217 /include/basegfx/tuple/Tuple2D.hxx
parent3b48e20b0101584a5e7ef48ba82238e735f0772b (diff)
make it easier to adjust the value of a basegfx Tuple2D
Change-Id: I849e945db651c5064b4ca0c1d15e9fa0066eeea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128299 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/basegfx/tuple/Tuple2D.hxx')
-rw-r--r--include/basegfx/tuple/Tuple2D.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/basegfx/tuple/Tuple2D.hxx b/include/basegfx/tuple/Tuple2D.hxx
index 96ba525bf989..44d546df6a30 100644
--- a/include/basegfx/tuple/Tuple2D.hxx
+++ b/include/basegfx/tuple/Tuple2D.hxx
@@ -71,6 +71,12 @@ public:
/// Set Y-Coordinate of 2D Tuple
void setY(TYPE fY) { mnY = fY; }
+ /// Adjust X-Coordinate of 2D Tuple
+ void adjustX(TYPE fX) { mnX += fX; }
+
+ /// Adjust Y-Coordinate of 2D Tuple
+ void adjustY(TYPE fY) { mnY += fY; }
+
// comparators with tolerance
template <typename T = TYPE, std::enable_if_t<std::is_integral_v<T>, int> = 0>