@@ -1013,10 +1013,10 @@ void ImDrawList::_AddPolyline(const ImVec2* points, const int points_count, ImU3
10131013
10141014 const ImDrawFlags stroke_pos = _GetStrokePos (flags, ImDrawFlags_StrokeCenter);
10151015 if (stroke_pos == ImDrawFlags_StrokeLegacy)
1016- flags = (flags | ImDrawFlags_MiterOnly ) & ~ImDrawFlags_AALineEnds;
1016+ flags = (flags | ImDrawFlags_JoinMiter ) & ~ImDrawFlags_AALineEnds;
10171017
10181018 const bool closed = (flags & ImDrawFlags_Closed) != 0 ;
1019- const bool miters_only = (flags & ImDrawFlags_MiterOnly ) != 0 ;
1019+ const bool miters_only = (flags & ImDrawFlags_JoinMiter ) != 0 ;
10201020 const float miter_distance_limit_sqr = IM_POLYLINE_MITER_LIMIT * IM_POLYLINE_MITER_LIMIT ;
10211021
10221022 float thickness0 = (thickness + fringe) * 0 .5f ; // Center (or legacy)
@@ -1082,7 +1082,7 @@ void ImDrawList::_AddPolyline(const ImVec2* points, const int points_count, ImU3
10821082
10831083 dir.x = n1.y ;
10841084 dir.y = -n1.x ;
1085- if (flags & ImDrawFlags_SquareCap )
1085+ if (flags & ImDrawFlags_CapSquare )
10861086 {
10871087 p1.x -= dir.x * half_thickness;
10881088 p1.y -= dir.y * half_thickness;
@@ -1268,7 +1268,7 @@ void ImDrawList::_AddPolyline(const ImVec2* points, const int points_count, ImU3
12681268 // End cap
12691269 dir.x = n1.y ;
12701270 dir.y = -n1.x ;
1271- if (flags & ImDrawFlags_SquareCap )
1271+ if (flags & ImDrawFlags_CapSquare )
12721272 {
12731273 p1.x += dir.x * half_thickness;
12741274 p1.y += dir.y * half_thickness;
@@ -1336,7 +1336,7 @@ void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_coun
13361336 {
13371337 const float half_aa = _FringeScale * 0 .5f ;
13381338 ImU32 col_trans = col & ~IM_COL32_A_MASK ;
1339- const bool miters_only = (flags & ImDrawFlags_MiterOnly ) != 0 ;
1339+ const bool miters_only = (flags & ImDrawFlags_JoinMiter ) != 0 ;
13401340 const float miter_distance_limit_sqr = IM_POLYLINE_MITER_LIMIT * IM_POLYLINE_MITER_LIMIT ;
13411341
13421342 const int idx_count = ((points_count - 2 ) + points_count * 2 + IM_POLYLINE_CONVEX_POLY_MAX_BEVELS ) * 3 ;
@@ -1891,7 +1891,7 @@ void ImDrawList::_AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float t
18911891
18921892 const ImDrawFlags stroke_pos = _GetStrokePos (flags, ImDrawFlags_StrokeCenter);
18931893 if (stroke_pos == ImDrawFlags_StrokeLegacy)
1894- flags = (flags | ImDrawFlags_MiterOnly ) & ~ImDrawFlags_AALineEnds;
1894+ flags = (flags | ImDrawFlags_JoinMiter ) & ~ImDrawFlags_AALineEnds;
18951895
18961896 float thickness0 = (thickness + fringe) * 0 .5f ; // Center (or legacy)
18971897 if (stroke_pos == ImDrawFlags_StrokeOutside)
@@ -1920,7 +1920,7 @@ void ImDrawList::_AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float t
19201920 float p1_y = p1.y ;
19211921 float p2_x = p2.x ;
19221922 float p2_y = p2.y ;
1923- if (flags & ImDrawFlags_SquareCap )
1923+ if (flags & ImDrawFlags_CapSquare )
19241924 {
19251925 p1_x -= dir_x * half_thickness;
19261926 p1_y -= dir_y * half_thickness;
@@ -2025,7 +2025,7 @@ void ImDrawList::AddLineH(float min_x, float max_x, float y, ImU32 col, float th
20252025 top_y -= thickness;
20262026
20272027 const bool is_truncated = IM_IS_TRUNCATED4 (min_x, max_x, top_y, thickness);
2028- if (_FringeScaleIsInteger && is_truncated && (flags & ImDrawFlags_SquareCap ) == 0 )
2028+ if (_FringeScaleIsInteger && is_truncated && (flags & ImDrawFlags_CapSquare ) == 0 )
20292029 {
20302030 if (thickness < _FringeScale) IM_UNLIKELY
20312031 {
@@ -2071,7 +2071,7 @@ void ImDrawList::AddLineV(float x, float min_y, float max_y, ImU32 col, float th
20712071 left_x -= thickness;
20722072
20732073 const bool is_truncated = IM_IS_TRUNCATED4 (left_x, min_y, max_y, thickness);
2074- if (_FringeScaleIsInteger && is_truncated && (flags & ImDrawFlags_SquareCap ) == 0 )
2074+ if (_FringeScaleIsInteger && is_truncated && (flags & ImDrawFlags_CapSquare ) == 0 )
20752075 {
20762076 if (thickness < _FringeScale) IM_UNLIKELY
20772077 {
@@ -2352,7 +2352,7 @@ void ImDrawList::AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, fl
23522352 PathRect (ImVec2 (p_min.x + 0 .50f , p_min.y + 0 .50f ), ImVec2 (p_max.x - 0 .50f , p_max.y - 0 .50f ), rounding, flags);
23532353 else
23542354 PathRect (ImVec2 (p_min.x + 0 .50f , p_min.y + 0 .50f ), ImVec2 (p_max.x - 0 .49f , p_max.y - 0 .49f ), rounding, flags); // Better looking lower-right corner and rounded non-AA shapes.
2355- PathStroke (col, thickness, ImDrawFlags_Closed | ImDrawFlags_MiterOnly | ImDrawFlags_StrokeCenter | (flags & ~ImDrawFlags_StrokeMask_));
2355+ PathStroke (col, thickness, ImDrawFlags_Closed | ImDrawFlags_JoinMiter | ImDrawFlags_StrokeCenter | (flags & ~ImDrawFlags_StrokeMask_));
23562356 return ;
23572357 }
23582358
@@ -2452,7 +2452,7 @@ void ImDrawList::AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, fl
24522452 if (!has_rounding || (flags & ImDrawFlags_RoundCornersMask_) == ImDrawFlags_RoundCornersNone)
24532453 {
24542454 const ImVec2 points[4 ] = { outer_min, ImVec2 (outer_max.x , outer_min.y ), outer_max, ImVec2 (outer_min.x , outer_max.y ) };
2455- _AddPolyline (points, 4 , col, thickness, ImDrawFlags_Closed | ImDrawFlags_MiterOnly | ImDrawFlags_StrokeInside, half_min_dim);
2455+ _AddPolyline (points, 4 , col, thickness, ImDrawFlags_Closed | ImDrawFlags_JoinMiter | ImDrawFlags_StrokeInside, half_min_dim);
24562456 _Path.Size = 0 ;
24572457 }
24582458 else
@@ -2474,7 +2474,7 @@ void ImDrawList::AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, fl
24742474 PathArcToFast (ImVec2 (outer_max.x - rounding_br, outer_max.y - rounding_br), rounding_br, 0 , 3 );
24752475 PathArcToFast (ImVec2 (outer_min.x + rounding_bl, outer_max.y - rounding_bl), rounding_bl, 3 , 6 );
24762476
2477- _AddPolyline (_Path.Data , _Path.Size , col, thickness, ImDrawFlags_Closed | ImDrawFlags_MiterOnly | ImDrawFlags_StrokeInside | (flags & ~ImDrawFlags_StrokeMask_), half_min_dim);
2477+ _AddPolyline (_Path.Data , _Path.Size , col, thickness, ImDrawFlags_Closed | ImDrawFlags_JoinMiter | ImDrawFlags_StrokeInside | (flags & ~ImDrawFlags_StrokeMask_), half_min_dim);
24782478 _Path.Size = 0 ;
24792479 }
24802480}
@@ -2553,7 +2553,7 @@ void ImDrawList::AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 c
25532553 height = _FringeScale;
25542554 }
25552555 const ImVec2 points[4 ] = { p_min, ImVec2 (p_min.x + width, p_min.y ), ImVec2 (p_min.x + width, p_min.y + height), ImVec2 (p_min.x , p_min.y + height) };
2556- AddConvexPolyFilled (points, 4 , col, ImDrawFlags_MiterOnly );
2556+ AddConvexPolyFilled (points, 4 , col, ImDrawFlags_JoinMiter );
25572557 return ;
25582558 }
25592559
@@ -2605,12 +2605,12 @@ void ImDrawList::AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 c
26052605 if (!has_rounding)
26062606 {
26072607 const ImVec2 points[4 ] = { p_min, ImVec2 (p_max.x , p_min.y ), p_max, ImVec2 (p_min.x , p_max.y ) };
2608- AddConvexPolyFilled (points, 4 , col, ImDrawFlags_MiterOnly );
2608+ AddConvexPolyFilled (points, 4 , col, ImDrawFlags_JoinMiter );
26092609 }
26102610 else
26112611 {
26122612 PathRect (p_min, p_max, rounding, flags);
2613- PathFillConvex (col, ImDrawFlags_MiterOnly );
2613+ PathFillConvex (col, ImDrawFlags_JoinMiter );
26142614 }
26152615}
26162616
@@ -2740,7 +2740,7 @@ void ImDrawList::AddCircle(const ImVec2& center, float radius, ImU32 col, int nu
27402740 // This will be used by _AddPolyline() to clamp the inner stroke expansion, to avoid creating rendering artifacts.
27412741 const float unit_apothem = ApproxApothem (_Path.Size );
27422742 const float edge_dist = radius * unit_apothem;
2743- _AddPolyline (_Path.Data , _Path.Size , col, thickness, ImDrawFlags_Closed | ImDrawFlags_MiterOnly | stroke_pos, edge_dist);
2743+ _AddPolyline (_Path.Data , _Path.Size , col, thickness, ImDrawFlags_Closed | ImDrawFlags_JoinMiter | stroke_pos, edge_dist);
27442744 _Path.Size = 0 ;
27452745}
27462746
@@ -2776,7 +2776,7 @@ void ImDrawList::AddCircleFilled(const ImVec2& center, float radius, ImU32 col,
27762776 PathArcTo (center, radius, 0 .0f , a_max, num_segments - 1 );
27772777 }
27782778
2779- PathFillConvex (col, ImDrawFlags_MiterOnly );
2779+ PathFillConvex (col, ImDrawFlags_JoinMiter );
27802780}
27812781
27822782// Guaranteed to honor 'num_segments'
@@ -2822,7 +2822,7 @@ void ImDrawList::AddNgon(const ImVec2& center, float radius, ImU32 col, int num_
28222822 // Because we are filling a closed shape we remove 1 from the count of segments/points
28232823 const float a_max = (IM_PI * 2 .0f ) * ((float )num_segments - 1 .0f ) / (float )num_segments;
28242824 PathArcTo (center, radius, 0 .0f , a_max, num_segments - 1 );
2825- _AddPolyline (_Path.Data , _Path.Size , col, thickness, ImDrawFlags_Closed | ImDrawFlags_MiterOnly | stroke_pos, edge_dist);
2825+ _AddPolyline (_Path.Data , _Path.Size , col, thickness, ImDrawFlags_Closed | ImDrawFlags_JoinMiter | stroke_pos, edge_dist);
28262826 _Path.Size = 0 ;
28272827}
28282828
@@ -2844,7 +2844,7 @@ void ImDrawList::AddNgonFilled(const ImVec2& center, float radius, ImU32 col, in
28442844 // Because we are filling a closed shape we remove 1 from the count of segments/points
28452845 const float a_max = (IM_PI * 2 .0f ) * ((float )num_segments - 1 .0f ) / (float )num_segments;
28462846 PathArcTo (center, radius, 0 .0f , a_max, num_segments - 1 );
2847- PathFillConvex (col, ImDrawFlags_MiterOnly );
2847+ PathFillConvex (col, ImDrawFlags_JoinMiter );
28482848}
28492849
28502850// Ellipse
@@ -2872,7 +2872,7 @@ void ImDrawList::AddEllipse(const ImVec2& center, const ImVec2& radius, ImU32 co
28722872
28732873 // Prevent the inside part of the stroke to be expanded too much to prevent some rendering artifacts.
28742874 const float max_inner_offset = ImMin (rad.x , rad.y );
2875- _AddPolyline (_Path.Data , _Path.Size , col, thickness, ImDrawFlags_Closed | ImDrawFlags_MiterOnly | stroke_pos, max_inner_offset);
2875+ _AddPolyline (_Path.Data , _Path.Size , col, thickness, ImDrawFlags_Closed | ImDrawFlags_JoinMiter | stroke_pos, max_inner_offset);
28762876 _Path.Size = 0 ;
28772877}
28782878
@@ -3019,7 +3019,7 @@ void ImDrawList::AddImageRounded(ImTextureRef tex_ref, const ImVec2& p_min, cons
30193019
30203020 int vert_start_idx = VtxBuffer.Size ;
30213021 PathRect (p_min, p_max, rounding, flags);
3022- PathFillConvex (col, ImDrawFlags_MiterOnly );
3022+ PathFillConvex (col, ImDrawFlags_JoinMiter );
30233023 int vert_end_idx = VtxBuffer.Size ;
30243024 ImGui::ShadeVertsLinearUV (this , vert_start_idx, vert_end_idx, p_min, p_max, uv_min, uv_max, true );
30253025
@@ -7642,7 +7642,7 @@ void ImGui::RenderRectFilledInRangeH(ImDrawList* draw_list, const ImRect& rect,
76427642 draw_list->PathArcTo (ImVec2 (x1, p1.y - rounding), rounding, +arc1_b, +arc1_e); // BR
76437643 }
76447644 }
7645- draw_list->PathFillConvex (col, ImDrawFlags_MiterOnly );
7645+ draw_list->PathFillConvex (col, ImDrawFlags_JoinMiter );
76467646}
76477647
76487648void ImGui::RenderRectFilledWithHole (ImDrawList* draw_list, const ImRect& outer, const ImRect& inner, ImU32 col, float rounding)
0 commit comments