summaryrefslogtreecommitdiff
path: root/plugingui/image.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-11-14 09:46:34 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2020-11-14 12:08:50 +0100
commita8eea6e9c1f32d5562594656c68dc4b9f985b790 (patch)
treefd44df99b9ff3bd4b4a19003653dbfa814e29f0c /plugingui/image.cc
parentacc285b59b264c6d8b1e724a883c56e7f24d22b0 (diff)
Add x_offset to drawable::line to be able to have drawImage render images outside the parent area.
Diffstat (limited to 'plugingui/image.cc')
-rw-r--r--plugingui/image.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugingui/image.cc b/plugingui/image.cc
index 1b858ad..118203e 100644
--- a/plugingui/image.cc
+++ b/plugingui/image.cc
@@ -198,9 +198,9 @@ const Colour& Image::getPixel(size_t x, size_t y) const
return image_data[x + y * _width];
}
-const std::uint8_t* Image::line(std::size_t y) const
+const std::uint8_t* Image::line(std::size_t y, std::size_t x_offset) const
{
- return image_data_raw.data() + y * _width * 4;
+ return image_data_raw.data() + y * _width * 4 + x_offset * 4;
}
bool Image::hasAlpha() const