MyGUI: MyGUI_TextureUtility.h Source File

MyGUI 3.2.2

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
23 MYGUI_FORCEINLINE void convertColour(uint32& _colour, VertexColourType _format)
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_
MyGUI_RenderFormat.h
MyGUI::uint32
unsigned int uint32
Definition: MyGUI_Types.h:48
MyGUI::VertexColourType::ColourABGR
Definition: MyGUI_RenderFormat.h:21
MyGUI_Prerequest.h
MyGUI::texture_utility::convertColour
__inline void convertColour(uint32 &_colour, VertexColourType _format)
Definition: MyGUI_TextureUtility.h:23
MyGUI::VertexColourType
Definition: MyGUI_RenderFormat.h:15
MyGUI::types::TSize< int >
MyGUI::Colour
Definition: MyGUI_Colour.h:16
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI_Colour.h
MYGUI_FORCEINLINE
#define MYGUI_FORCEINLINE
Definition: MyGUI_Platform.h:53
MyGUI::texture_utility::getTextureSize
const IntSize & getTextureSize(const std::string &_texture, bool _cache=true)
Definition: MyGUI_TextureUtility.cpp:20
MyGUI
Definition: MyGUI_ActionController.h:14
MyGUI::texture_utility::toColourARGB
uint32 toColourARGB(const Colour &_colour)
Definition: MyGUI_TextureUtility.cpp:69