MyGUI: MyGUI_TextureUtility.h Source File

MyGUI 3.4.3

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::texture_utility
15{
16
17 MYGUI_EXPORT const IntSize& getTextureSize(const std::string& _texture, bool _cache = true);
19 MYGUI_EXPORT uint32 toNativeColour(const Colour& _colour, VertexColourType _format);
21 MYGUI_EXPORT void convertColour(uint32& _colour, VertexColourType _format);
22
23#ifndef MYGUI_DONT_USE_OBSOLETE
24 MYGUI_OBSOLETE(
25 " is deprecated, use : uint32 texture_utility::toNativeColour(const Colour& _colour, VertexColourType _format)")
26 inline uint32 toColourARGB(const Colour& _colour)
27 {
28 return toNativeColour(_colour, VertexColourType::ColourARGB);
29 }
30#endif
31
32} // namespace MyGUI
33
34#endif // MYGUI_TEXTURE_UTILITY_H_
MyGUI_Colour.h
MYGUI_OBSOLETE
#define MYGUI_OBSOLETE(text)
Definition MyGUI_Diagnostic.h:68
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_RenderFormat.h
MyGUI::texture_utility
Definition MyGUI_TextureUtility.h:15
MyGUI::texture_utility::convertColour
void convertColour(uint32 &_colour, VertexColourType _format)
Convert from 32-bit ARGB to native colour (ABGR or ARGB)
Definition MyGUI_TextureUtility.cpp:86
MyGUI::texture_utility::toColourARGB
uint32 toColourARGB(const Colour &_colour)
Definition MyGUI_TextureUtility.h:26
MyGUI::texture_utility::getTextureSize
const IntSize & getTextureSize(const std::string &_texture, bool _cache=true)
Definition MyGUI_TextureUtility.cpp:17
MyGUI::texture_utility::toNativeColour
uint32 toNativeColour(const Colour &_colour, VertexColourType _format)
Convert Colour to 32-bit representation.
Definition MyGUI_TextureUtility.cpp:63
MyGUI::uint32
uint32_t uint32
Definition MyGUI_Types.h:48
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::Colour
Definition MyGUI_Colour.h:17
MyGUI::VertexColourType
Definition MyGUI_RenderFormat.h:16
MyGUI::VertexColourType::ColourARGB
@ ColourARGB
Definition MyGUI_RenderFormat.h:20