ImDrawList

imguicpp.ImDrawList (extern class)

Static Members

pushClipRect(self: cpp.Star, clipRectMin: ImVec2, clipRectMax: ImVec2, ?intersectWithCurrentClipRect: Bool = false): Void

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)

Name Type Default
self cpp.Star
clipRectMin ImVec2
clipRectMax ImVec2
intersectWithCurrentClipRect Bool false

pushClipRectFullScreen(self: cpp.Star): Void
Name Type
self cpp.Star

popClipRect(self: cpp.Star): Void
Name Type
self cpp.Star

pushTexture(self: cpp.Star, texRef: ImTextureRef): Void
Name Type
self cpp.Star
texRef ImTextureRef

popTexture(self: cpp.Star): Void
Name Type
self cpp.Star

getClipRectMin(self: cpp.Star): ImVec2
Name Type
self cpp.Star
Returns
ImVec2

getClipRectMax(self: cpp.Star): ImVec2
Name Type
self cpp.Star
Returns
ImVec2

addLineEx(self: cpp.Star, p1: ImVec2, p2: ImVec2, col: UInt, ?thickness: cpp.Float32 = 1.0): Void
Name Type Default
self cpp.Star
p1 ImVec2
p2 ImVec2
col UInt
thickness cpp.Float32 1.0

addLine(self: cpp.Star, p1: ImVec2, p2: ImVec2, col: UInt): Void

Implied thickness = 1.0f

Name Type
self cpp.Star
p1 ImVec2
p2 ImVec2
col UInt

addLineHEx(self: cpp.Star, minX: cpp.Float32, maxX: cpp.Float32, y: cpp.Float32, col: UInt, ?thickness: cpp.Float32 = 1.0): Void
Name Type Default
self cpp.Star
minX cpp.Float32
maxX cpp.Float32
y cpp.Float32
col UInt
thickness cpp.Float32 1.0

addLineH(self: cpp.Star, minX: cpp.Float32, maxX: cpp.Float32, y: cpp.Float32, col: UInt): Void

Implied thickness = 1.0f

Name Type
self cpp.Star
minX cpp.Float32
maxX cpp.Float32
y cpp.Float32
col UInt

addLineVEx(self: cpp.Star, x: cpp.Float32, minY: cpp.Float32, maxY: cpp.Float32, col: UInt, ?thickness: cpp.Float32 = 1.0): Void
Name Type Default
self cpp.Star
x cpp.Float32
minY cpp.Float32
maxY cpp.Float32
col UInt
thickness cpp.Float32 1.0

addLineV(self: cpp.Star, x: cpp.Float32, minY: cpp.Float32, maxY: cpp.Float32, col: UInt): Void

Implied thickness = 1.0f

Name Type
self cpp.Star
x cpp.Float32
minY cpp.Float32
maxY cpp.Float32
col UInt

addRectEx(self: cpp.Star, pMin: ImVec2, pMax: ImVec2, col: UInt, ?rounding: cpp.Float32 = 0.0, ?thickness: cpp.Float32 = 1.0, ?flags: Int = 0): Void

a: upper-left, b: lower-right (== upper-left + size)

Name Type Default
self cpp.Star
pMin ImVec2
pMax ImVec2
col UInt
rounding cpp.Float32 0.0
thickness cpp.Float32 1.0
flags Int 0

addRect(self: cpp.Star, pMin: ImVec2, pMax: ImVec2, col: UInt): Void

Implied rounding = 0.0f, thickness = 1.0f, flags = 0

Name Type
self cpp.Star
pMin ImVec2
pMax ImVec2
col UInt

addRectFilledEx(self: cpp.Star, pMin: ImVec2, pMax: ImVec2, col: UInt, ?rounding: cpp.Float32 = 0.0, ?flags: Int = 0): Void

a: upper-left, b: lower-right (== upper-left + size)

Name Type Default
self cpp.Star
pMin ImVec2
pMax ImVec2
col UInt
rounding cpp.Float32 0.0
flags Int 0

addRectFilled(self: cpp.Star, pMin: ImVec2, pMax: ImVec2, col: UInt): Void

Implied rounding = 0.0f, flags = 0

Name Type
self cpp.Star
pMin ImVec2
pMax ImVec2
col UInt

addRectFilledMultiColor(self: cpp.Star, pMin: ImVec2, pMax: ImVec2, colUprLeft: UInt, colUprRight: UInt, colBotRight: UInt, colBotLeft: UInt): Void
Name Type
self cpp.Star
pMin ImVec2
pMax ImVec2
colUprLeft UInt
colUprRight UInt
colBotRight UInt
colBotLeft UInt

addQuadEx(self: cpp.Star, p1: ImVec2, p2: ImVec2, p3: ImVec2, p4: ImVec2, col: UInt, ?thickness: cpp.Float32 = 1.0): Void
Name Type Default
self cpp.Star
p1 ImVec2
p2 ImVec2
p3 ImVec2
p4 ImVec2
col UInt
thickness cpp.Float32 1.0

addQuad(self: cpp.Star, p1: ImVec2, p2: ImVec2, p3: ImVec2, p4: ImVec2, col: UInt): Void

Implied thickness = 1.0f

Name Type
self cpp.Star
p1 ImVec2
p2 ImVec2
p3 ImVec2
p4 ImVec2
col UInt

addQuadFilled(self: cpp.Star, p1: ImVec2, p2: ImVec2, p3: ImVec2, p4: ImVec2, col: UInt): Void
Name Type
self cpp.Star
p1 ImVec2
p2 ImVec2
p3 ImVec2
p4 ImVec2
col UInt

addTriangleEx(self: cpp.Star, p1: ImVec2, p2: ImVec2, p3: ImVec2, col: UInt, ?thickness: cpp.Float32 = 1.0): Void
Name Type Default
self cpp.Star
p1 ImVec2
p2 ImVec2
p3 ImVec2
col UInt
thickness cpp.Float32 1.0

addTriangle(self: cpp.Star, p1: ImVec2, p2: ImVec2, p3: ImVec2, col: UInt): Void

Implied thickness = 1.0f

Name Type
self cpp.Star
p1 ImVec2
p2 ImVec2
p3 ImVec2
col UInt

addTriangleFilled(self: cpp.Star, p1: ImVec2, p2: ImVec2, p3: ImVec2, col: UInt): Void
Name Type
self cpp.Star
p1 ImVec2
p2 ImVec2
p3 ImVec2
col UInt

addCircleEx(self: cpp.Star, center: ImVec2, radius: cpp.Float32, col: UInt, ?numSegments: Int = 0, ?thickness: cpp.Float32 = 1.0): Void
Name Type Default
self cpp.Star
center ImVec2
radius cpp.Float32
col UInt
numSegments Int 0
thickness cpp.Float32 1.0

addCircle(self: cpp.Star, center: ImVec2, radius: cpp.Float32, col: UInt): Void

Implied num_segments = 0, thickness = 1.0f

Name Type
self cpp.Star
center ImVec2
radius cpp.Float32
col UInt

addCircleFilled(self: cpp.Star, center: ImVec2, radius: cpp.Float32, col: UInt, ?numSegments: Int = 0): Void
Name Type Default
self cpp.Star
center ImVec2
radius cpp.Float32
col UInt
numSegments Int 0

addNgonEx(self: cpp.Star, center: ImVec2, radius: cpp.Float32, col: UInt, numSegments: Int, ?thickness: cpp.Float32 = 1.0): Void
Name Type Default
self cpp.Star
center ImVec2
radius cpp.Float32
col UInt
numSegments Int
thickness cpp.Float32 1.0

addNgon(self: cpp.Star, center: ImVec2, radius: cpp.Float32, col: UInt, numSegments: Int): Void

Implied thickness = 1.0f

Name Type
self cpp.Star
center ImVec2
radius cpp.Float32
col UInt
numSegments Int

addNgonFilled(self: cpp.Star, center: ImVec2, radius: cpp.Float32, col: UInt, numSegments: Int): Void
Name Type
self cpp.Star
center ImVec2
radius cpp.Float32
col UInt
numSegments Int

addEllipseEx(self: cpp.Star, center: ImVec2, radius: ImVec2, col: UInt, ?rot: cpp.Float32 = 0.0, ?numSegments: Int = 0, ?thickness: cpp.Float32 = 1.0): Void
Name Type Default
self cpp.Star
center ImVec2
radius ImVec2
col UInt
rot cpp.Float32 0.0
numSegments Int 0
thickness cpp.Float32 1.0

addEllipse(self: cpp.Star, center: ImVec2, radius: ImVec2, col: UInt): Void

Implied rot = 0.0f, num_segments = 0, thickness = 1.0f

Name Type
self cpp.Star
center ImVec2
radius ImVec2
col UInt

addEllipseFilledEx(self: cpp.Star, center: ImVec2, radius: ImVec2, col: UInt, ?rot: cpp.Float32 = 0.0, ?numSegments: Int = 0): Void
Name Type Default
self cpp.Star
center ImVec2
radius ImVec2
col UInt
rot cpp.Float32 0.0
numSegments Int 0

addEllipseFilled(self: cpp.Star, center: ImVec2, radius: ImVec2, col: UInt): Void

Implied rot = 0.0f, num_segments = 0

Name Type
self cpp.Star
center ImVec2
radius ImVec2
col UInt

addTextEx(self: cpp.Star, pos: ImVec2, col: UInt, textBegin: cpp.ConstCharStar, ?textEnd: cpp.ConstCharStar = null): Void
Name Type Default
self cpp.Star
pos ImVec2
col UInt
textBegin cpp.ConstCharStar
textEnd cpp.ConstCharStar null

addText(self: cpp.Star, pos: ImVec2, col: UInt, textBegin: cpp.ConstCharStar): Void

Implied text_end = NULL

Name Type
self cpp.Star
pos ImVec2
col UInt
textBegin cpp.ConstCharStar

addTextImFontPtrEx(self: cpp.Star, font: cpp.Star, fontSize: cpp.Float32, pos: ImVec2, col: UInt, textBegin: cpp.ConstCharStar, ?textEnd: cpp.ConstCharStar = null, ?wrapWidth: cpp.Float32 = 0.0, ?cpuFineClipRect: cpp.Star = null): Void
Name Type Default
self cpp.Star
font cpp.Star
fontSize cpp.Float32
pos ImVec2
col UInt
textBegin cpp.ConstCharStar
textEnd cpp.ConstCharStar null
wrapWidth cpp.Float32 0.0
cpuFineClipRect cpp.Star null

addTextImFontPtr(self: cpp.Star, font: cpp.Star, fontSize: cpp.Float32, pos: ImVec2, col: UInt, textBegin: cpp.ConstCharStar): Void

Implied text_end = NULL, wrap_width = 0.0f, cpu_fine_clip_rect = NULL

Name Type
self cpp.Star
font cpp.Star
fontSize cpp.Float32
pos ImVec2
col UInt
textBegin cpp.ConstCharStar

addBezierCubic(self: cpp.Star, p1: ImVec2, p2: ImVec2, p3: ImVec2, p4: ImVec2, col: UInt, thickness: cpp.Float32, ?numSegments: Int = 0): Void

Cubic Bezier (4 control points)

Name Type Default
self cpp.Star
p1 ImVec2
p2 ImVec2
p3 ImVec2
p4 ImVec2
col UInt
thickness cpp.Float32
numSegments Int 0

addBezierQuadratic(self: cpp.Star, p1: ImVec2, p2: ImVec2, p3: ImVec2, col: UInt, thickness: cpp.Float32, ?numSegments: Int = 0): Void

Quadratic Bezier (3 control points)

Name Type Default
self cpp.Star
p1 ImVec2
p2 ImVec2
p3 ImVec2
col UInt
thickness cpp.Float32
numSegments Int 0

addPolyline(self: cpp.Star, points: cpp.Star, numPoints: Int, col: UInt, thickness: cpp.Float32, ?flags: Int = 0): Void
Name Type Default
self cpp.Star
points cpp.Star
numPoints Int
col UInt
thickness cpp.Float32
flags Int 0

addConvexPolyFilled(self: cpp.Star, points: cpp.Star, numPoints: Int, col: UInt): Void
Name Type
self cpp.Star
points cpp.Star
numPoints Int
col UInt

addConcavePolyFilled(self: cpp.Star, points: cpp.Star, numPoints: Int, col: UInt): Void
Name Type
self cpp.Star
points cpp.Star
numPoints Int
col UInt

addImageEx(self: cpp.Star, texRef: ImTextureRef, pMin: ImVec2, pMax: ImVec2, uvMin: ImVec2, uvMax: ImVec2, col: UInt): Void
Name Type
self cpp.Star
texRef ImTextureRef
pMin ImVec2
pMax ImVec2
uvMin ImVec2
uvMax ImVec2
col UInt

addImage(self: cpp.Star, texRef: ImTextureRef, pMin: ImVec2, pMax: ImVec2): Void

Implied uv_min = ImVec2(0, 0), uv_max = ImVec2(1, 1), col = IM_COL32_WHITE

Name Type
self cpp.Star
texRef ImTextureRef
pMin ImVec2
pMax ImVec2

addImageQuadEx(self: cpp.Star, texRef: ImTextureRef, p1: ImVec2, p2: ImVec2, p3: ImVec2, p4: ImVec2, uv1: ImVec2, uv2: ImVec2, uv3: ImVec2, uv4: ImVec2, col: UInt): Void
Name Type
self cpp.Star
texRef ImTextureRef
p1 ImVec2
p2 ImVec2
p3 ImVec2
p4 ImVec2
uv1 ImVec2
uv2 ImVec2
uv3 ImVec2
uv4 ImVec2
col UInt

addImageQuad(self: cpp.Star, texRef: ImTextureRef, p1: ImVec2, p2: ImVec2, p3: ImVec2, p4: ImVec2): Void

Implied uv1 = ImVec2(0, 0), uv2 = ImVec2(1, 0), uv3 = ImVec2(1, 1), uv4 = ImVec2(0, 1), col = IM_COL32_WHITE

Name Type
self cpp.Star
texRef ImTextureRef
p1 ImVec2
p2 ImVec2
p3 ImVec2
p4 ImVec2

addImageRounded(self: cpp.Star, texRef: ImTextureRef, pMin: ImVec2, pMax: ImVec2, uvMin: ImVec2, uvMax: ImVec2, col: UInt, rounding: cpp.Float32, ?flags: Int = 0): Void
Name Type Default
self cpp.Star
texRef ImTextureRef
pMin ImVec2
pMax ImVec2
uvMin ImVec2
uvMax ImVec2
col UInt
rounding cpp.Float32
flags Int 0

pathClear(self: cpp.Star): Void
Name Type
self cpp.Star

pathLineTo(self: cpp.Star, pos: ImVec2): Void
Name Type
self cpp.Star
pos ImVec2

pathLineToMergeDuplicate(self: cpp.Star, pos: ImVec2): Void
Name Type
self cpp.Star
pos ImVec2

pathFillConvex(self: cpp.Star, col: UInt): Void
Name Type
self cpp.Star
col UInt

pathFillConcave(self: cpp.Star, col: UInt): Void
Name Type
self cpp.Star
col UInt

pathStroke(self: cpp.Star, col: UInt, ?thickness: cpp.Float32 = 1.0, ?flags: Int = 0): Void
Name Type Default
self cpp.Star
col UInt
thickness cpp.Float32 1.0
flags Int 0

pathArcTo(self: cpp.Star, center: ImVec2, radius: cpp.Float32, aMin: cpp.Float32, aMax: cpp.Float32, ?numSegments: Int = 0): Void
Name Type Default
self cpp.Star
center ImVec2
radius cpp.Float32
aMin cpp.Float32
aMax cpp.Float32
numSegments Int 0

pathArcToFast(self: cpp.Star, center: ImVec2, radius: cpp.Float32, aMinOf12: Int, aMaxOf12: Int): Void

Use precomputed angles for a 12 steps circle

Name Type
self cpp.Star
center ImVec2
radius cpp.Float32
aMinOf12 Int
aMaxOf12 Int

pathEllipticalArcToEx(self: cpp.Star, center: ImVec2, radius: ImVec2, rot: cpp.Float32, aMin: cpp.Float32, aMax: cpp.Float32, ?numSegments: Int = 0): Void

Ellipse

Name Type Default
self cpp.Star
center ImVec2
radius ImVec2
rot cpp.Float32
aMin cpp.Float32
aMax cpp.Float32
numSegments Int 0

pathEllipticalArcTo(self: cpp.Star, center: ImVec2, radius: ImVec2, rot: cpp.Float32, aMin: cpp.Float32, aMax: cpp.Float32): Void

Implied num_segments = 0

Name Type
self cpp.Star
center ImVec2
radius ImVec2
rot cpp.Float32
aMin cpp.Float32
aMax cpp.Float32

pathBezierCubicCurveTo(self: cpp.Star, p2: ImVec2, p3: ImVec2, p4: ImVec2, ?numSegments: Int = 0): Void

Cubic Bezier (4 control points)

Name Type Default
self cpp.Star
p2 ImVec2
p3 ImVec2
p4 ImVec2
numSegments Int 0

pathBezierQuadraticCurveTo(self: cpp.Star, p2: ImVec2, p3: ImVec2, ?numSegments: Int = 0): Void

Quadratic Bezier (3 control points)

Name Type Default
self cpp.Star
p2 ImVec2
p3 ImVec2
numSegments Int 0

pathRect(self: cpp.Star, rectMin: ImVec2, rectMax: ImVec2, ?rounding: cpp.Float32 = 0.0, ?flags: Int = 0): Void
Name Type Default
self cpp.Star
rectMin ImVec2
rectMax ImVec2
rounding cpp.Float32 0.0
flags Int 0

addCallbackEx(self: cpp.Star, callback: ImGuiOpaqueCallback, ?userdata: cpp.RawPointer<cpp.Void> = null, ?userdataSize: cpp.SizeT = 0): Void
Name Type Default
self cpp.Star
callback ImGuiOpaqueCallback
userdata cpp.RawPointer<cpp.Void> null
userdataSize cpp.SizeT 0

addCallback(self: cpp.Star, callback: ImGuiOpaqueCallback): Void

Implied userdata = NULL, userdata_size = 0

Name Type
self cpp.Star
callback ImGuiOpaqueCallback

addDrawCmd(self: cpp.Star): Void

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

Name Type
self cpp.Star

cloneOutput(self: cpp.Star): cpp.Star

Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer. For multi-threaded rendering, consider using imgui_threaded_rendering from https://github.com/ocornut/imgui_club instead.

Name Type
self cpp.Star
Returns
cpp.Star

channelsSplit(self: cpp.Star, count: Int): Void
Name Type
self cpp.Star
count Int

channelsMerge(self: cpp.Star): Void
Name Type
self cpp.Star

channelsSetCurrent(self: cpp.Star, n: Int): Void
Name Type
self cpp.Star
n Int

primReserve(self: cpp.Star, idxCount: Int, vtxCount: Int): Void
Name Type
self cpp.Star
idxCount Int
vtxCount Int

primUnreserve(self: cpp.Star, idxCount: Int, vtxCount: Int): Void
Name Type
self cpp.Star
idxCount Int
vtxCount Int

primRect(self: cpp.Star, a: ImVec2, b: ImVec2, col: UInt): Void

Axis aligned rectangle (composed of two triangles)

Name Type
self cpp.Star
a ImVec2
b ImVec2
col UInt

primRectUV(self: cpp.Star, a: ImVec2, b: ImVec2, uvA: ImVec2, uvB: ImVec2, col: UInt): Void
Name Type
self cpp.Star
a ImVec2
b ImVec2
uvA ImVec2
uvB ImVec2
col UInt

primQuadUV(self: cpp.Star, a: ImVec2, b: ImVec2, c: ImVec2, d: ImVec2, uvA: ImVec2, uvB: ImVec2, uvC: ImVec2, uvD: ImVec2, col: UInt): Void
Name Type
self cpp.Star
a ImVec2
b ImVec2
c ImVec2
d ImVec2
uvA ImVec2
uvB ImVec2
uvC ImVec2
uvD ImVec2
col UInt

primWriteVtx(self: cpp.Star, pos: ImVec2, uv: ImVec2, col: UInt): Void
Name Type
self cpp.Star
pos ImVec2
uv ImVec2
col UInt

primWriteIdx(self: cpp.Star, idx: cpp.UInt16): Void
Name Type
self cpp.Star
idx cpp.UInt16

primVtx(self: cpp.Star, pos: ImVec2, uv: ImVec2, col: UInt): Void

Write vertex with unique index

Name Type
self cpp.Star
pos ImVec2
uv ImVec2
col UInt

Instance Members

Draw commands. Typically 1 command = 1 GPU draw call, unless the command is a callback.


Index buffer. Each command consume ImDrawCmd::ElemCount of those


Vertex buffer.


flags: Int

Flags, you may poke into these to adjust anti-aliasing settings per-primitive.

Metadata

Name Parameters
:structAccess -
:include "linc_imgui.h"