aboutsummaryrefslogtreecommitdiff
path: root/graphics/transparent_surface.h
diff options
context:
space:
mode:
authorEugene Sandulenko2015-04-13 01:53:10 +0200
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitea80e24481f12c117d6aecf6e5260b08423454ec (patch)
tree337aa3f0f143a1936c58680a1b47f1f638e35590 /graphics/transparent_surface.h
parent6524a8d103c87def348b9560418850cb48d24ce4 (diff)
downloadscummvm-rg350-ea80e24481f12c117d6aecf6e5260b08423454ec.tar.gz
scummvm-rg350-ea80e24481f12c117d6aecf6e5260b08423454ec.tar.bz2
scummvm-rg350-ea80e24481f12c117d6aecf6e5260b08423454ec.zip
GUI: Added animation classes
Diffstat (limited to 'graphics/transparent_surface.h')
-rw-r--r--graphics/transparent_surface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/graphics/transparent_surface.h b/graphics/transparent_surface.h
index 461d7a6e4b..8654183548 100644
--- a/graphics/transparent_surface.h
+++ b/graphics/transparent_surface.h
@@ -154,6 +154,13 @@ struct TransparentSurface : public Graphics::Surface {
TransparentSurface *convertTo(const PixelFormat &dstFormat, const byte *palette = 0) const;
+ float getRatio() {
+ if (!w)
+ return 0;
+
+ return h / (float)w;
+ }
+
AlphaType getAlphaMode() const;
void setAlphaMode(AlphaType);
private: