diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-07-02 04:36:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-07-02 04:37:42 +0300 |
commit | ca58a3cced99fc2a8989da0155c1927bc0f08b6f (patch) | |
tree | c8fc16ac2c5c0a9184c17c2920266b96934ed28f /src/gui/widgets/icon.cpp | |
parent | d4dd89e72f8b1e2c0517981f7e3ffac4a040f9fa (diff) | |
download | mv-ca58a3cced99fc2a8989da0155c1927bc0f08b6f.tar.gz mv-ca58a3cced99fc2a8989da0155c1927bc0f08b6f.tar.bz2 mv-ca58a3cced99fc2a8989da0155c1927bc0f08b6f.tar.xz mv-ca58a3cced99fc2a8989da0155c1927bc0f08b6f.zip |
Replace some getters to direct member access in Image class.
Diffstat (limited to 'src/gui/widgets/icon.cpp')
-rw-r--r-- | src/gui/widgets/icon.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp index 2799080b6..3e9c7dd24 100644 --- a/src/gui/widgets/icon.cpp +++ b/src/gui/widgets/icon.cpp @@ -34,21 +34,21 @@ Icon::Icon(const std::string &file) { mImage = ResourceManager::getInstance()->getImage(file); if (mImage) - setSize(mImage->getWidth(), mImage->getHeight()); + setSize(mImage->mBounds.w, mImage->mBounds.h); } Icon::Icon(Image *image) : mImage(image) { if (mImage) - setSize(mImage->getWidth(), mImage->getHeight()); + setSize(mImage->mBounds.w, mImage->mBounds.h); } void Icon::setImage(Image *image) { mImage = image; if (mImage) - setSize(mImage->getWidth(), mImage->getHeight()); + setSize(mImage->mBounds.w, mImage->mBounds.h); } void Icon::draw(gcn::Graphics *g) @@ -56,8 +56,8 @@ void Icon::draw(gcn::Graphics *g) if (mImage) { Graphics *graphics = static_cast<Graphics*>(g); - const int x = (getWidth() - mImage->getWidth()) / 2; - const int y = (getHeight() - mImage->getHeight()) / 2; + const int x = (getWidth() - mImage->mBounds.w) / 2; + const int y = (getHeight() - mImage->mBounds.h) / 2; graphics->drawImage(mImage, x, y); } } |