protected virtual void PositionMidLabel(DiagramShape lab, PointF a, PointF b) { PointF tf1 = new PointF((a.X + b.X) / 2f, (a.Y + b.Y) / 2f); int num1 = 1; if (!this.MidLabelCentered) { if (a.X < b.X) { if (base.IsApprox(a.Y, b.Y)) { num1 = 0x80; } else if (a.Y < b.Y) { num1 = 0x10; } else { num1 = 8; } } else if (base.IsApprox(a.Y, b.Y)) { num1 = 0x20; } else if (a.Y < b.Y) { num1 = 2; } else { num1 = 4; } } lab.SetSpotLocation(num1, tf1); }