| 2812 | } |
| 2813 | |
| 2814 | ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in) |
| 2815 | { |
| 2816 | ImU32 out; |
| 2817 | out = ((ImU32)IM_F32_TO_INT8_SAT(in.x)) << IM_COL32_R_SHIFT; |
| 2818 | out |= ((ImU32)IM_F32_TO_INT8_SAT(in.y)) << IM_COL32_G_SHIFT; |
| 2819 | out |= ((ImU32)IM_F32_TO_INT8_SAT(in.z)) << IM_COL32_B_SHIFT; |
| 2820 | out |= ((ImU32)IM_F32_TO_INT8_SAT(in.w)) << IM_COL32_A_SHIFT; |
| 2821 | return out; |
| 2822 | } |
| 2823 | |
| 2824 | // Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1]), from Foley & van Dam p592 |
| 2825 | // Optimized http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv |
nothing calls this directly
no outgoing calls
no test coverage detected