internal GraphicsPath GetFramePath(GaugeGraphics g, float shrinkBy) { RectangleF frameRectangle = GetFrameRectangle(g); float absoluteDimension = g.GetAbsoluteDimension(shrinkBy); frameRectangle.Inflate(0f - absoluteDimension, 0f - absoluteDimension); if (shrinkBy > 0f) { frameRectangle.Inflate(1f, 1f); } if (FrameShape == BackFrameShape.Circular) { GraphicsPath graphicsPath = new GraphicsPath(); graphicsPath.AddEllipse(frameRectangle); return(graphicsPath); } if (FrameShape == BackFrameShape.AutoShape) { GraphicsPath graphicsPath2 = new GraphicsPath(); if (Parent is CircularGauge) { CircularGauge circularGauge = (CircularGauge)Parent; if (circularGauge.Scales.Count == 0) { graphicsPath2.AddEllipse(frameRectangle); } else { BuildCircularGaugeAutoFrame(g, graphicsPath2, circularGauge, shrinkBy); } } else { graphicsPath2.AddRectangle(frameRectangle); } return(graphicsPath2); } if (FrameShape != BackFrameShape.RoundedRectangular) { if (FrameShape == BackFrameShape.Rectangular) { GraphicsPath graphicsPath3 = new GraphicsPath(); graphicsPath3.AddRectangle(frameRectangle); return(graphicsPath3); } GraphicsPath graphicsPath4 = new GraphicsPath(); graphicsPath4.FillMode = FillMode.Winding; XamlRenderer cachedXamlRenderer = GetCachedXamlRenderer(g); graphicsPath4.AddPath(cachedXamlRenderer.Layers[0].Paths[0], connect: false); return(graphicsPath4); } float num = (!(frameRectangle.Width > frameRectangle.Height)) ? frameRectangle.Width : frameRectangle.Height; float num2 = num / 8f; float[] array = new float[10]; for (int i = 0; i < 10; i++) { array[i] = num2; } return(g.CreateRoundedRectPath(frameRectangle, array)); }