DrawList: added ImDrawFlags_NoAAEnds which allows to disable line end AA.

This commit is contained in:
Mikko Mononen
2026-05-22 10:09:57 +03:00
committed by ocornut
parent fc3097ba17
commit 2b0e9043dc
3 changed files with 54 additions and 29 deletions

View File

@@ -3446,13 +3446,14 @@ enum ImDrawFlags_
ImDrawFlags_Closed = 1 << 9, // PathStroke(), AddPolyline(): specify that shape should be closed.
ImDrawFlags_MiterOnly = 1 << 10, // PathStroke(), AddPolyline(): use miter corners only. This assumes that the input polyline does not have corners sharper than 90 degrees. Slightly faster.
ImDrawFlags_SquareCap = 1 << 11, // PathStroke(), AddPolyline(): use square cap line ends.
ImDrawFlags_NoAAEnds = 1 << 12, // PathStroke(), AddPolyline(): do not generate anti-aliased line ends. This can speed up single line rendering.
// Stroke position relative to the shape outline
ImDrawFlags_StrokeInside = 1 << 16, // Draw stroke inside of the shape outline (Default)
ImDrawFlags_StrokeInside = 1 << 16, // Draw stroke inside of the shape outline (default for closed shapes and AddLineH, AddLineV functions)
ImDrawFlags_StrokeCenter = 2 << 16, // Draw stroke at the center of the shape outline
ImDrawFlags_StrokeCenterPixelAligned = 3 << 16, // Draw stroke at the center of the shape outline, so that half thickness (rounded down) will be outside, and rest inside the shape outline.
ImDrawFlags_StrokeOutside = 4 << 16, // Draw stroke outside of the shape outline
ImDrawFlags_StrokeLegacy = 5 << 16, // Use legacy position
ImDrawFlags_StrokeLegacy = 5 << 16, // Use legacy positioning + enable MiterOnly and NoAAEnds flags.
ImDrawFlags_StrokeMask_ = 0x07 << 16,
ImDrawFlags_InvalidMask_ = ~0x7FFFFFF0, // == 0x8000000F,