| 2879 | } |
| 2880 | |
| 2881 | ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in) |
| 2882 | { |
| 2883 | ImU32 out; |
| 2884 | out = ((ImU32)IM_F32_TO_INT8_SAT(in.x)) << IM_COL32_R_SHIFT; |
| 2885 | out |= ((ImU32)IM_F32_TO_INT8_SAT(in.y)) << IM_COL32_G_SHIFT; |
| 2886 | out |= ((ImU32)IM_F32_TO_INT8_SAT(in.z)) << IM_COL32_B_SHIFT; |
| 2887 | out |= ((ImU32)IM_F32_TO_INT8_SAT(in.w)) << IM_COL32_A_SHIFT; |
| 2888 | return out; |
| 2889 | } |
| 2890 | |
| 2891 | // Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1]), from Foley & van Dam p592 |
| 2892 | // Optimized http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv |
nothing calls this directly
no outgoing calls
no test coverage detected