Please refer to the javadoc of java.awt.Shape for the definition of insideness.
Brian On Thu, 13 Jun 2002, Matias Rodriguez wrote: > Hello. I have a doubt about the following code. > > GeneralPath p=new GeneralPath(); > > p.moveTo(0,0); > p.lineTo(1,0); > p.lineTo(1,1); > p.lineTo(0,1); > p.closePath(); > > System.out.println(p.contains(0,0)); //prints true > System.out.println(p.contains(1,1)); //prints false > > Why does the "p.contains(1,1)" returns false and "p.contains(0,0)" returns > true if both points are part of the Shape? I was expecting to return true > even if the point is at the boundary. > > Regards. > Mat�as Rodriguez. > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff JAVA2D-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". > ==========================================================================To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
