Lines Matching defs:col

282 void ImGui::TextColored(const ImVec4& col, const char* fmt, ...)
286 TextColoredV(col, fmt, args);
290 void ImGui::TextColoredV(const ImVec4& col, const char* fmt, va_list args)
292 PushStyleColor(ImGuiCol_Text, col);
698 const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
700 RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding);
815 ImU32 col = GetColorU32(held ? ImGuiCol_ButtonActive : ImGuiCol_ButtonHovered);
818 window->DrawList->AddCircleFilled(center, ImMax(2.0f, g.FontSize * 0.5f + 1.0f), col, 12);
1041 const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
1043 RenderFrame(bb.Min, bb.Max, col, true, ImClamp((float)ImMin(padding.x, padding.y), 0.0f, g.Style.FrameRounding));
1485 const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : (hovered && g.HoveredIdTimer >= hover_visibility_delay) ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator);
1486 window->DrawList->AddRectFilled(bb_render.Min, bb_render.Max, col, 0.0f);
4703 ImU32 col = GetColorU32(is_displaying_hint ? ImGuiCol_TextDisabled : ImGuiCol_Text);
4704 draw_window->DrawList->AddText(g.Font, g.FontSize, draw_pos - draw_scroll, col, buf_display, buf_display_end, 0.0f, is_multiline ? NULL : &clip_rect);
4734 ImU32 col = GetColorU32(is_displaying_hint ? ImGuiCol_TextDisabled : ImGuiCol_Text);
4735 draw_window->DrawList->AddText(g.Font, g.FontSize, draw_pos, col, buf_display, buf_display_end, 0.0f, is_multiline ? NULL : &clip_rect);
4784 bool ImGui::ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags)
4786 return ColorEdit4(label, col, flags | ImGuiColorEditFlags_NoAlpha);
4791 static void ColorEditRestoreHS(const float* col, float* H, float* S, float* V)
4800 if (g.ColorEditLastColor != ImGui::ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 0)))
4816 bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags)
4841 ColorEditOptionsPopup(col, flags);
4861 float f[4] = { col[0], col[1], col[2], alpha ? col[3] : 1.0f };
4868 ColorEditRestoreHS(col, &f[0], &f[1], &f[2]);
4955 const ImVec4 col_v4(col[0], col[1], col[2], alpha ? col[3] : 1.0f);
4980 value_changed |= ColorPicker4("##picker", col, picker_flags, &g.ColorPickerRef.x);
5008 col[0] = f[0];
5009 col[1] = f[1];
5010 col[2] = f[2];
5012 col[3] = f[3];
5025 memcpy((float*)col, payload->Data, sizeof(float) * 3); // Preserve alpha if any //-V512
5030 memcpy((float*)col, payload->Data, sizeof(float) * components);
5036 ColorConvertRGBtoHSV(col[0], col[1], col[2], col[0], col[1], col[2]);
5050 bool ImGui::ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags)
5052 float col4[4] = { col[0], col[1], col[2], 1.0f };
5055 col[0] = col4[0]; col[1] = col4[1]; col[2] = col4[2];
5070 // (In C++ the 'float col[4]' notation for a function argument is equivalent to 'float* col', we only specify a size to facilitate understanding of the code.)
5073 bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags, const float* ref_col)
5095 ColorPickerOptionsPopup(col, flags);
5119 memcpy(backup_initial_col, col, components * sizeof(float));
5132 float H = col[0], S = col[1], V = col[2];
5133 float R = col[0], G = col[1], B = col[2];
5138 ColorEditRestoreHS(col, &H, &S, &V);
5193 if (g.ColorEditLastColor == ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 0)))
5217 col[3] = 1.0f - ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size - 1));
5243 ImVec4 col_v4(col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]);
5255 memcpy(col, ref_col, components * sizeof(float));
5268 ColorConvertHSVtoRGB(H, S, V, col[0], col[1], col[2]);
5271 g.ColorEditLastColor = ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 0));
5275 col[0] = H;
5276 col[1] = S;
5277 col[2] = V;
5289 if (ColorEdit4("##rgb", col, sub_flags | ImGuiColorEditFlags_DisplayRGB))
5297 value_changed |= ColorEdit4("##hsv", col, sub_flags | ImGuiColorEditFlags_DisplayHSV);
5299 value_changed |= ColorEdit4("##hex", col, sub_flags | ImGuiColorEditFlags_DisplayHex);
5307 ColorConvertRGBtoHSV(col[0], col[1], col[2], new_H, new_S, new_V);
5311 ColorConvertHSVtoRGB(H, S, new_V <= 0 ? V * 0.5f : new_V, col[0], col[1], col[2]);
5313 ColorConvertHSVtoRGB(H, new_S <= 0 ? S * 0.5f : new_S, new_V, col[0], col[1], col[2]);
5321 R = col[0];
5322 G = col[1];
5323 B = col[2];
5325 ColorEditRestoreHS(col, &H, &S, &V); // Fix local Hue as display below will use it immediately.
5329 H = col[0];
5330 S = col[1];
5331 V = col[2];
5419 float alpha = ImSaturate(col[3]);
5430 if (value_changed && memcmp(backup_initial_col, col, components * sizeof(float)) == 0)
5443 // Note that 'col' may be encoded in HSV if ImGuiColorEditFlags_InputHSV is set.
5444 bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags, ImVec2 size)
5468 ImVec4 col_rgb = col;
5514 ColorButton(desc_id, col, flags);
5522 ColorTooltip(desc_id, &col.x, flags & (ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf));
5547 void ImGui::ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags)
5560 ImVec4 cf(col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]);
5561 int cr = IM_F32_TO_INT8_SAT(col[0]), cg = IM_F32_TO_INT8_SAT(col[1]), cb = IM_F32_TO_INT8_SAT(col[2]), ca = (flags & ImGuiColorEditFlags_NoAlpha) ? 255 : IM_F32_TO_INT8_SAT(col[3]);
5567 Text("#%02X%02X%02X\nR: %d, G: %d, B: %d\n(%.3f, %.3f, %.3f)", cr, cg, cb, cr, cg, cb, col[0], col[1], col[2]);
5569 Text("#%02X%02X%02X%02X\nR:%d, G:%d, B:%d, A:%d\n(%.3f, %.3f, %.3f, %.3f)", cr, cg, cb, ca, cr, cg, cb, ca, col[0], col[1], col[2], col[3]);
5574 Text("H: %.3f, S: %.3f, V: %.3f", col[0], col[1], col[2]);
5576 Text("H: %.3f, S: %.3f, V: %.3f, A: %.3f", col[0], col[1], col[2], col[3]);
5581 void ImGui::ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags)
5608 int cr = IM_F32_TO_INT8_SAT(col[0]), cg = IM_F32_TO_INT8_SAT(col[1]), cb = IM_F32_TO_INT8_SAT(col[2]), ca = (flags & ImGuiColorEditFlags_NoAlpha) ? 255 : IM_F32_TO_INT8_SAT(col[3]);
5610 ImFormatString(buf, IM_ARRAYSIZE(buf), "(%.3ff, %.3ff, %.3ff, %.3ff)", col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]);
6248 const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
6249 RenderFrame(bb.Min, bb.Max, col, false, 0.0f);
7232 const ImU32 col = GetColorU32((flags & ImGuiTabBarFlags_IsFocused) ? ImGuiCol_TabActive : ImGuiCol_TabUnfocusedActive);
7237 window->DrawList->AddLine(ImVec2(separator_min_x, y), ImVec2(separator_max_x, y), col, 1.0f);
8102 void ImGui::TabItemBackground(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col)
8116 draw_list->PathFillConvex(col);