Archana, The number of pixels in a polygon is approximately equivalent to the area of the polygon. That can be a murky number as it depends on the exact shape of the polygon, screen resolution, etc., but for most purposes the area of the �ideal� polygon will be close enough provided the sides of the polygon have a reasonable number of pixels.
There is a very nice Java geometry package here: http://geosoft.no/software/ Search for �geometry� on this page. All you need to do is add the geometry.jar file as a library to your applications. The javadoc on the web page explains each function. I haven�t tried the polygon area function (computePolygonArea), but it looks straightforward to use. Dan On Mon, 2 May 2005 17:00:33 -0700, Archana Chilukuri <[EMAIL PROTECTED]> wrote: >Hi all, > >Does anybody know a way to compute the number of pixels enclosed in a >polygon. > >thanks, >Archana =========================================================================== 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".
