draw_list->AddRectFilled(ImVec2(x,y),ImVec2(x+sz,y+thickness),col);x+=sz+spacing;// Horizontal line (faster than AddLine, but only handle integer thickness)
draw_list->AddRectFilled(ImVec2(x,y),ImVec2(x+thickness,y+sz),col);x+=spacing*2.0f;// Vertical line (faster than AddLine, but only handle integer thickness)
// Declare temporary variables in outer scope. Declared without a default value would trigger static analyser, and doing it in inner-scope would be more wasteful.
floatmlx,mly,mrx,mry;// Left and right miters
floatmlax=0.0f,mlay=0.0f,mrax=0.0f,mray=0.0f;// Left and right miters including anti-aliasing
floatb1x=0.0f,b1y=0.0f,b2x=0.0f,b2y=0.0f;// First and second bevel point
floatb1ax=0.0f,b1ay=0.0f,b2ax=0.0f,b2ay=0.0f;// First and second bevel point including anti-aliasing
floatsqlen1=0.0f;
floatdx1,dy1;
floatdx1=0.0f,dy1=0.0f;
if(closed)
{
dx1=points[0].x-points[points_count-1].x;
@ -823,8 +829,6 @@ if (USE_NEW_CODE)
}
floatmiter_l_recip=dx1*dy2-dy1*dx2;
floatmlx,mly,mrx,mry;// Left and right miters
floatmlax,mlay,mrax,mray;// Left and right miters including anti-aliasing
constboolbevel=(dx1*dx2+dy1*dy2)>1e-5f;
if(ImFabs(miter_l_recip)>1e-5f)
{
@ -869,8 +873,6 @@ if (USE_NEW_CODE)
// The two bevel vertices if the angle is right or obtuse
// miter_sign == 1, iff the outer (maybe bevelled) edge is on the right, -1 iff it is on the left