From d4eb0fd33a7fa0c3037e9200ab258a5577c4b9ab Mon Sep 17 00:00:00 2001 From: Malik Olivier Boussejra Date: Mon, 30 Apr 2018 00:22:03 +0900 Subject: [PATCH] [cimgui 1.53.1] DrawList: Add ImDrawListFlags to ImDrawList --- imgui-sys/src/lib.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/imgui-sys/src/lib.rs b/imgui-sys/src/lib.rs index 795ecb0..40f78b3 100644 --- a/imgui-sys/src/lib.rs +++ b/imgui-sys/src/lib.rs @@ -362,6 +362,14 @@ bitflags!( } ); +bitflags!( + #[repr(C)] + pub struct ImDrawListFlags: c_int { + const AntiAliasedLines = 1 << 0; + const AntiAliasedFill = 1 << 1; + } +); + pub type ImGuiTextEditCallback = Option< extern "C" fn(data: *mut ImGuiTextEditCallbackData) -> c_int, >; @@ -723,6 +731,8 @@ pub struct ImDrawList { pub idx_buffer: ImVector, pub vtx_buffer: ImVector, + flags: ImDrawListFlags, + data: *const ImDrawListSharedData, owner_name: *const c_char, vtx_current_idx: c_uint, vtx_write_ptr: *mut ImDrawVert, @@ -735,6 +745,20 @@ pub struct ImDrawList { channels: ImVector, } +#[repr(C)] +struct ImDrawListSharedData { + /// UV of white pixel in the atlas + tex_uv_white_pixel: ImVec2, + /// Current/default font (optional, for simplified AddText overload) + font: *mut ImFont, + /// Current/default font size (optional, for simplified AddText overload) + font_size: c_float, + curve_tessellation_tol: c_float, + /// Value for PushClipRectFullscreen() + clip_rect_fullscreen: ImVec4, + circle_vtx12: [ImVec2; 12], +} + /// All draw command lists required to render the frame #[repr(C)] pub struct ImDrawData {