API reference
Preparing search index…

ImGui.ImDrawList_AddLine

  • Add a line to the draw list.

    Parameters

    self

    ImDrawList handle on which this method operates.

    p1

    Ordered vertex or start point p1 in absolute screen coordinates.

    p2

    Ordered vertex or start point p2 in absolute screen coordinates.

    col
    number

    Packed ImU32 RGBA color; alpha controls opacity.

    Returns

    void
    • Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing.

    • 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 older versions (until Dear ImGui 1.77) the native Dear ImGui AddCircle methods defaulted to num_segments == 12. In future versions we will use textures to provide cheaper and higher-quality circles. Use ImDrawList_AddNgon() and ImDrawList_AddNgonFilled() if you need to guarantee a specific number of sides.

    Implied thickness = 1.0

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0