aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/XPM.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/XPM.cxx')
-rw-r--r--src/XPM.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/XPM.cxx b/src/XPM.cxx
index 65c2d4835..31d87a06d 100644
--- a/src/XPM.cxx
+++ b/src/XPM.cxx
@@ -239,6 +239,14 @@ RGBAImage::RGBAImage(const XPM &xpm) {
}
}
+float RGBAImage::GetScaledHeight() const noexcept {
+ return static_cast<float>(height) / scale;
+}
+
+float RGBAImage::GetScaledWidth() const noexcept {
+ return static_cast<float>(width) / scale;
+}
+
int RGBAImage::CountBytes() const noexcept {
return width * height * 4;
}