public override void Draw(System.Drawing.Graphics g) { Point point1 = _entity1.GetOuterPoint(_entity1.Position, _entity2.Position); Point point2 = _entity2.GetOuterPoint(_entity2.Position, _entity1.Position); if (DrawingHelperFunctions.Distance(_entity1.Position, point1) + DrawingHelperFunctions.Distance(_entity2.Position, point2) <= DrawingHelperFunctions.Distance(_entity1.Position, _entity2.Position) ) { g.DrawLine(new System.Drawing.Pen(Color.Blue), point1, point2); } }
public override void Draw(System.Drawing.Graphics g) { Point point1 = _entity1.GetOuterPoint(_entity1.Position, _entity2.Position); Point point2 = _entity2.GetOuterPoint(_entity2.Position, _entity1.Position); if (DrawingHelperFunctions.Distance(_entity1.Position, point1) + DrawingHelperFunctions.Distance(_entity2.Position, point2) <= DrawingHelperFunctions.Distance(_entity1.Position, _entity2.Position) ) { Pen pen = new Pen(Color.Blue); //pen.CustomEndCap = new AdjustableArrowCap(3, 3); //pen.StartCap = LineCap.NoAnchor; //pen.StartCap = LineCap.ArrowAnchor; //pen.EndCap = LineCap.RoundAnchor; g.DrawLine(pen, point1, point2); } }
public override void Draw(System.Drawing.Graphics g) { Point point1 = _entity1.GetOuterPoint(_entity1.Position, _entity2.Position); Point point2 = _entity2.GetOuterPoint(_entity2.Position, _entity1.Position); int w = Math.Abs(point1.X - point2.X); int h = Math.Abs(point1.Y - point2.Y); Size size = new Size(w, h); Rectangle R = new Rectangle(point1, size); if (DrawingHelperFunctions.Distance(_entity1.Position, point1) + DrawingHelperFunctions.Distance(_entity2.Position, point2) <= DrawingHelperFunctions.Distance(_entity1.Position, _entity2.Position) ) { g.DrawArc(new System.Drawing.Pen(Color.Blue), R, (float)Math.PI / 5, (float)Math.PI / 6); } //g.DrawArc(new System.Drawing.Pen(Color.Blue), R, 0, 30); }