mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 21:21:06 +01:00 
			
		
		
		
	AddCircle, AddCircleFilled: Add auto-calculation of circle segment counts (amends)
Tweak default max error value, Changelog, comments, path-fast for 12 segments circles, made LUT store ImU8
This commit is contained in:
		
							
								
								
									
										11
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -1941,6 +1941,9 @@ struct ImDrawList | ||||
|  | ||||
|     // Primitives | ||||
|     // - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. | ||||
|     // - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred).  | ||||
|     //   In future versions we will use textures to provide cheaper and higher-quality circles.  | ||||
|     //   Use AddNgon() and AddNgonFilled() functions if you need to guaranteed a specific number of sides. | ||||
|     IMGUI_API void  AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f); | ||||
|     IMGUI_API void  AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All, float thickness = 1.0f);   // a: upper-left, b: lower-right (== upper-left + size), rounding_corners_flags: 4 bits corresponding to which corner to round | ||||
|     IMGUI_API void  AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All);                     // a: upper-left, b: lower-right (== upper-left + size) | ||||
| @@ -1949,10 +1952,10 @@ struct ImDrawList | ||||
|     IMGUI_API void  AddQuadFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col); | ||||
|     IMGUI_API void  AddTriangle(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness = 1.0f); | ||||
|     IMGUI_API void  AddTriangleFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col); | ||||
|     IMGUI_API void  AddCircle(const ImVec2& center, float radius, ImU32 col, int num_segments = 12, float thickness = 1.0f); // Draw a circle - use num_segments <= 0 to automatically calculate tessellation (preferred). Use AddNgon() instead if you need a specific segment count. | ||||
|     IMGUI_API void  AddCircleFilled(const ImVec2& center, float radius, ImU32 col, int num_segments = 12); // Draw a filled circle - use num_segments <= 0 to automatically calculate tessellation (preferred). Use AddNgonFilled() instead if you need a specific segment count. | ||||
|     IMGUI_API void  AddNgon(const ImVec2& center, float radius, ImU32 col, int num_segments, float thickness = 1.0f); // Draw an n-gon with a specific number of sides. Use AddCircle() instead if you want an actual circle and don't care about the exact side count. | ||||
|     IMGUI_API void  AddNgonFilled(const ImVec2& center, float radius, ImU32 col, int num_segments); // Draw a filled n-gon with a specific number of sides. Use AddCircleFilled() instead if you want an actual circle and don't care about the exact side count. | ||||
|     IMGUI_API void  AddCircle(const ImVec2& center, float radius, ImU32 col, int num_segments = 12, float thickness = 1.0f); | ||||
|     IMGUI_API void  AddCircleFilled(const ImVec2& center, float radius, ImU32 col, int num_segments = 12); | ||||
|     IMGUI_API void  AddNgon(const ImVec2& center, float radius, ImU32 col, int num_segments, float thickness = 1.0f); | ||||
|     IMGUI_API void  AddNgonFilled(const ImVec2& center, float radius, ImU32 col, int num_segments); | ||||
|     IMGUI_API void  AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL); | ||||
|     IMGUI_API void  AddText(const ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL, float wrap_width = 0.0f, const ImVec4* cpu_fine_clip_rect = NULL); | ||||
|     IMGUI_API void  AddPolyline(const ImVec2* points, int num_points, ImU32 col, bool closed, float thickness); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user