MCPcopy Create free account
hub / github.com/MyGUI/mygui / toNativeColour

Function toNativeColour

MyGUIEngine/src/MyGUI_TextureUtility.cpp:63–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 uint32 toNativeColour(const Colour& _colour, VertexColourType _format)
64 {
65 uint32 val32 = uint8(_colour.alpha * 255);
66 val32 <<= 8;
67 if (_format == VertexColourType::ColourABGR)
68 {
69 val32 += uint8(_colour.blue * 255);
70 val32 <<= 8;
71 val32 += uint8(_colour.green * 255);
72 val32 <<= 8;
73 val32 += uint8(_colour.red * 255);
74 }
75 else
76 {
77 val32 += uint8(_colour.red * 255);
78 val32 <<= 8;
79 val32 += uint8(_colour.green * 255);
80 val32 <<= 8;
81 val32 += uint8(_colour.blue * 255);
82 }
83 return val32;
84 }
85
86 void convertColour(uint32& _colour, VertexColourType _format)
87 {

Callers 7

_setColourMethod · 0.85
_setColourMethod · 0.85
_setTextColourMethod · 0.85
setShadowColourMethod · 0.85
_setColourMethod · 0.85
_setColourMethod · 0.85
toColourARGBFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected