From ea80e24481f12c117d6aecf6e5260b08423454ec Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 13 Apr 2015 01:53:10 +0200 Subject: GUI: Added animation classes --- graphics/transparent_surface.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'graphics/transparent_surface.h') 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: -- cgit v1.2.3