DrawList: Fixed divide-by-zero or glitches with Radius/Rounding values close to zero. (#5249, #5293, #3491)

Amend 8ed34af6f8
This commit is contained in:
ocornut
2022-05-13 17:18:06 +02:00
parent 9779cc2fe2
commit 9e0517a134
4 changed files with 11 additions and 11 deletions

View File

@ -694,7 +694,6 @@ struct ImChunkStream
//
// Rendering circles with an odd number of segments, while mathematically correct will produce
// asymmetrical results on the raster grid. Therefore we're rounding N to next even number (7->8, 8->8, 9->10 etc.)
//
#define IM_ROUNDUP_TO_EVEN(_V) ((((_V) + 1) / 2) * 2)
#define IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MIN 4
#define IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MAX 512