| 4833 | } |
| 4834 | |
| 4835 | void ColormapIcon(ImPlotColormap cmap) { |
| 4836 | ImPlotContext& gp = *GImPlot; |
| 4837 | const float txt_size = ImGui::GetTextLineHeight(); |
| 4838 | ImVec2 size(txt_size-4,txt_size); |
| 4839 | ImGuiWindow* window = ImGui::GetCurrentWindow(); |
| 4840 | ImVec2 pos = window->DC.CursorPos; |
| 4841 | ImRect rect(pos+ImVec2(0,2),pos+size-ImVec2(0,2)); |
| 4842 | ImDrawList& DrawList = *ImGui::GetWindowDrawList(); |
| 4843 | RenderColorBar(gp.ColormapData.GetKeys(cmap),gp.ColormapData.GetKeyCount(cmap),DrawList,rect,false,false,!gp.ColormapData.IsQual(cmap)); |
| 4844 | ImGui::Dummy(size); |
| 4845 | } |
| 4846 | |
| 4847 | ImDrawList* GetPlotDrawList() { |
| 4848 | return ImGui::GetWindowDrawList(); |
no test coverage detected