using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows. Forms;
using System.Drawing. Drawing2D;
using System.Collecti ons;
namespace Wire_Poc1
{
public partial class Form1 : Form
{
ArrayList GrfxPthList = new ArrayList();
public Form1()
{
InitializeCompo nent();
}
protected override void OnLoad(EventArg s e)
{
base.OnLoad(e);
}
GraphicsPath myPath;
protected override void OnMouseClick(Mo useEventArgs e)
{
Graphics grfxClick = this.CreateGrap hics();
myPath = new GraphicsPath();
myPath.AddArc(e .X, e.Y, 20, 20, 0, 180);
grfxClick.DrawP ath(new Pen(Color.Red), myPath);
GrfxPthList.Add (myPath);
base.OnMouseCli ck(e);
}
}
}
I am using GraphicsPath to drawing an object (Arc), But i want to make a validation
1) I should protect the Drawing of an object(Arc) above an Arc.// Arc should not intersect with an Arc.
so i used isVisible .But it does not works , Since path.isVisible takes a rectangle.I also used Region concept.But i cant able to acheive??
Please Give me soultion
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows. Forms;
using System.Drawing. Drawing2D;
using System.Collecti ons;
namespace Wire_Poc1
{
public partial class Form1 : Form
{
ArrayList GrfxPthList = new ArrayList();
public Form1()
{
InitializeCompo nent();
}
protected override void OnLoad(EventArg s e)
{
base.OnLoad(e);
}
GraphicsPath myPath;
protected override void OnMouseClick(Mo useEventArgs e)
{
Graphics grfxClick = this.CreateGrap hics();
myPath = new GraphicsPath();
myPath.AddArc(e .X, e.Y, 20, 20, 0, 180);
grfxClick.DrawP ath(new Pen(Color.Red), myPath);
GrfxPthList.Add (myPath);
base.OnMouseCli ck(e);
}
}
}
I am using GraphicsPath to drawing an object (Arc), But i want to make a validation
1) I should protect the Drawing of an object(Arc) above an Arc.// Arc should not intersect with an Arc.
so i used isVisible .But it does not works , Since path.isVisible takes a rectangle.I also used Region concept.But i cant able to acheive??
Please Give me soultion