Im trying to write a basic drawing app with some formulas that requires me to keep my points precise. all is working well but one part that will allow me to proceed with this program. I need to use the Control.GetChildAtPoint Method to see if there is an object at a certain point of the line but my points is all in pointF (float). here is a short piece of the code that should make sense.
if (poscount > 15) {
//to see if point is close to an object
if (this.GetChildAtPoint(point2) != null) {
label1.Text = "I found an object";
} else label1.Text = " no object found";
}
Sorry for the stupid example but at the point2 (which is apointF) it gives an error that I cant convert from afloattoSystem.Drawing.Point. I cant find a way to convert it and keep the accuracy. Is there a way I can useGetChildAtPointwith afloat`?
Aucun commentaire:
Enregistrer un commentaire