MyGUI  3.2.1
MyGUI_TextureUtility.h
Go to the documentation of this file.
1 /*
2  * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3  * Distributed under the MIT License
4  * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5  */
6 
7 #ifndef __MYGUI_TEXTURE_UTILITY_H__
8 #define __MYGUI_TEXTURE_UTILITY_H__
9 
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Colour.h"
12 #include "MyGUI_RenderFormat.h"
13 
14 namespace MyGUI
15 {
16 
17  namespace texture_utility
18  {
19 
20  MYGUI_EXPORT const IntSize& getTextureSize(const std::string& _texture, bool _cache = true);
21  MYGUI_EXPORT uint32 toColourARGB(const Colour& _colour);
22 
24  {
25  if (_format == VertexColourType::ColourABGR)
26  _colour = ((_colour & 0x00FF0000) >> 16) | ((_colour & 0x000000FF) << 16) | (_colour & 0xFF00FF00);
27  }
28 
29 
30  } // namespace texture_utility
31 
32 } // namespace MyGUI
33 
34 #endif // __MYGUI_TEXTURE_UTILITY_H__