struct ImGui::ImDrawList
- ImGui::ImDrawList
- Struct
- Value
- Object
Overview
Included Modules
- ImGui::ClassType(LibImGui::ImDrawList)
Defined in:
imgui.crobj.cr
Constructors
Instance Method Summary
- 
        #add_bezier_cubic(p1 : ImVec2, p2 : ImVec2, p3 : ImVec2, p4 : ImVec2, col : UInt32, thickness : Float32, num_segments : Int32 = 0) : Void
        
          Cubic Bezier (4 control points) 
- 
        #add_bezier_quadratic(p1 : ImVec2, p2 : ImVec2, p3 : ImVec2, col : UInt32, thickness : Float32, num_segments : Int32 = 0) : Void
        
          Quadratic Bezier (3 control points) 
- 
        #add_callback(callback : ImDrawCallback, callback_data : Pointer(Void)) : Void
        
          Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles. 
- #add_callback(&block : ImDrawList, ImDrawCmd -> ) : Void
- #add_circle(center : ImVec2, radius : Float32, col : UInt32, num_segments : Int32 = 0, thickness : Float32 = 1.0) : Void
- #add_circle_filled(center : ImVec2, radius : Float32, col : UInt32, num_segments : Int32 = 0) : Void
- 
        #add_convex_poly_filled(points : Pointer(ImVec2), num_points : Int32, col : UInt32) : Void
        
          Note: Anti-aliased filling requires points to be in clockwise order. 
- 
        #add_draw_cmd : Void
        
          This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). 
- #add_image(user_texture_id : ImTextureID, p_min : ImVec2, p_max : ImVec2, uv_min : ImVec2 = ImVec2.new(0, 0), uv_max : ImVec2 = ImVec2.new(1, 1), col : UInt32 = 4294967295_i64) : Void
- #add_image_quad(user_texture_id : ImTextureID, p1 : ImVec2, p2 : ImVec2, p3 : ImVec2, p4 : ImVec2, uv1 : ImVec2 = ImVec2.new(0, 0), uv2 : ImVec2 = ImVec2.new(1, 0), uv3 : ImVec2 = ImVec2.new(1, 1), uv4 : ImVec2 = ImVec2.new(0, 1), col : UInt32 = 4294967295_i64) : Void
- #add_image_rounded(user_texture_id : ImTextureID, p_min : ImVec2, p_max : ImVec2, uv_min : ImVec2, uv_max : ImVec2, col : UInt32, rounding : Float32, flags : ImDrawFlags = ImDrawFlags.new(0)) : Void
- #add_line(p1 : ImVec2, p2 : ImVec2, col : UInt32, thickness : Float32 = 1.0) : Void
- #add_ngon(center : ImVec2, radius : Float32, col : UInt32, num_segments : Int32, thickness : Float32 = 1.0) : Void
- #add_ngon_filled(center : ImVec2, radius : Float32, col : UInt32, num_segments : Int32) : Void
- #add_polyline(points : Pointer(ImVec2), num_points : Int32, col : UInt32, flags : ImDrawFlags, thickness : Float32) : Void
- #add_quad(p1 : ImVec2, p2 : ImVec2, p3 : ImVec2, p4 : ImVec2, col : UInt32, thickness : Float32 = 1.0) : Void
- #add_quad_filled(p1 : ImVec2, p2 : ImVec2, p3 : ImVec2, p4 : ImVec2, col : UInt32) : Void
- 
        #add_rect(p_min : ImVec2, p_max : ImVec2, col : UInt32, rounding : Float32 = 0.0, flags : ImDrawFlags = ImDrawFlags.new(0), thickness : Float32 = 1.0) : Void
        
          a: upper-left, b: lower-right (== upper-left + size) 
- 
        #add_rect_filled(p_min : ImVec2, p_max : ImVec2, col : UInt32, rounding : Float32 = 0.0, flags : ImDrawFlags = ImDrawFlags.new(0)) : Void
        
          a: upper-left, b: lower-right (== upper-left + size) 
- #add_rect_filled_multi_color(p_min : ImVec2, p_max : ImVec2, col_upr_left : UInt32, col_upr_right : UInt32, col_bot_right : UInt32, col_bot_left : UInt32) : Void
- #add_text(font : ImFont, font_size : Float32, pos : ImVec2, col : UInt32, text : Bytes | String, wrap_width : Float32 = 0.0, cpu_fine_clip_rect : Pointer(ImVec4) = Pointer(ImVec4).null) : Void
- #add_text(pos : ImVec2, col : UInt32, text : Bytes | String) : Void
- #add_triangle(p1 : ImVec2, p2 : ImVec2, p3 : ImVec2, col : UInt32, thickness : Float32 = 1.0) : Void
- #add_triangle_filled(p1 : ImVec2, p2 : ImVec2, p3 : ImVec2, col : UInt32) : Void
- #channels_merge : Void
- #channels_set_current(n : Int32) : Void
- #channels_split(count : Int32) : Void
- 
        #clone_output : ImDrawList
        
          Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer. 
- 
        #cmd_buffer : ImVector(LibImGui::ImDrawCmd)
        
          Draw commands. 
- #cmd_buffer=(cmd_buffer : ImVector(LibImGui::ImDrawCmd))
- 
        #flags : ImDrawListFlags
        
          Flags, you may poke into these to adjust anti-aliasing settings per-primitive. 
- #flags=(flags : ImDrawListFlags)
- #get_clip_rect_max : ImGui::ImVec2
- #get_clip_rect_min : ImGui::ImVec2
- 
        #idx_buffer : ImVector(ImDrawIdx)
        
          Index buffer. 
- #idx_buffer=(idx_buffer : ImVector(ImDrawIdx))
- #path_arc_to(center : ImVec2, radius : Float32, a_min : Float32, a_max : Float32, num_segments : Int32 = 0) : Void
- 
        #path_arc_to_fast(center : ImVec2, radius : Float32, a_min_of_12 : Int32, a_max_of_12 : Int32) : Void
        
          Use precomputed angles for a 12 steps circle 
- 
        #path_bezier_cubic_curve_to(p2 : ImVec2, p3 : ImVec2, p4 : ImVec2, num_segments : Int32 = 0) : Void
        
          Cubic Bezier (4 control points) 
- 
        #path_bezier_quadratic_curve_to(p2 : ImVec2, p3 : ImVec2, num_segments : Int32 = 0) : Void
        
          Quadratic Bezier (3 control points) 
- #path_clear : Void
- 
        #path_fill_convex(col : UInt32) : Void
        
          Note: Anti-aliased filling requires points to be in clockwise order. 
- #path_line_to(pos : ImVec2) : Void
- #path_line_to_merge_duplicate(pos : ImVec2) : Void
- #path_rect(rect_min : ImVec2, rect_max : ImVec2, rounding : Float32 = 0.0, flags : ImDrawFlags = ImDrawFlags.new(0)) : Void
- #path_stroke(col : UInt32, flags : ImDrawFlags = ImDrawFlags.new(0), thickness : Float32 = 1.0) : Void
- #pop_clip_rect : Void
- #pop_texture_id : Void
- #prim_quad_uv(a : ImVec2, b : ImVec2, c : ImVec2, d : ImVec2, uv_a : ImVec2, uv_b : ImVec2, uv_c : ImVec2, uv_d : ImVec2, col : UInt32) : Void
- 
        #prim_rect(a : ImVec2, b : ImVec2, col : UInt32) : Void
        
          Axis aligned rectangle (composed of two triangles) 
- #prim_rect_uv(a : ImVec2, b : ImVec2, uv_a : ImVec2, uv_b : ImVec2, col : UInt32) : Void
- #prim_reserve(idx_count : Int32, vtx_count : Int32) : Void
- #prim_unreserve(idx_count : Int32, vtx_count : Int32) : Void
- 
        #prim_vtx(pos : ImVec2, uv : ImVec2, col : UInt32) : Void
        
          Write vertex with unique index 
- #prim_write_idx(idx : ImDrawIdx) : Void
- #prim_write_vtx(pos : ImVec2, uv : ImVec2, col : UInt32) : Void
- 
        #push_clip_rect(clip_rect_min : ImVec2, clip_rect_max : ImVec2, intersect_with_current_clip_rect : Bool = false) : Void
        
          Render-level scissoring. 
- #push_clip_rect_full_screen : Void
- #push_texture_id(texture_id : ImTextureID) : Void
- #to_unsafe : Pointer(T)
- 
        #vtx_buffer : ImVector(ImDrawVert)
        
          Vertex buffer. 
- #vtx_buffer=(vtx_buffer : ImVector(ImDrawVert))
Constructor Detail
Instance Method Detail
Cubic Bezier (4 control points)
Quadratic Bezier (3 control points)
Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles.
Note: Anti-aliased filling requires points to be in clockwise order.
This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible
a: upper-left, b: lower-right (== upper-left + size)
a: upper-left, b: lower-right (== upper-left + size)
Draw commands. Typically 1 command = 1 GPU draw call, unless the command is a callback.
Flags, you may poke into these to adjust anti-aliasing settings per-primitive.
Index buffer. Each command consume ImDrawCmd::ElemCount of those
Use precomputed angles for a 12 steps circle
Cubic Bezier (4 control points)
Quadratic Bezier (3 control points)
Note: Anti-aliased filling requires points to be in clockwise order.
Axis aligned rectangle (composed of two triangles)
Write vertex with unique index
Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling)