|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to draw irregular shape and calculate its surface?Hello everybody,
I load first some image in the picturebox. I would like to draw (with pressed mouse) a line in the picturebox making so an irregular shape and then to color this shape and finally to calculate how many pixel are there. So I could compare different shapes. How to make it? Thanks for your ideas! Uwe Have a look at the System.Drawing probably 10.000 samples on Internet how
to draw a line in an image. http://msdn.microsoft.com/en-us/library/system.drawing.aspx Show quoteHide quote "Uwe Conradi" <conr***@arcor.de> wrote in message news:ODHoXSW7KHA.5112@TK2MSFTNGP02.phx.gbl... > Hello everybody, > I load first some image in the picturebox. > I would like to draw (with pressed mouse) a line in the picturebox making > so an irregular shape and then to color this shape and finally to > calculate how many pixel are there. So I could compare different shapes. > How to make it? > Thanks for your ideas! > Uwe To calculate the surface area, the normal approach would be to break the
irregular shape into a large number of rectangles, each of small size (often very small). Calculate the area of each rectangle, then sum all of those areas. This is a standard technique, and while not exact -- such a calculation never can be exact, unless you have a mathematical formula that describes the surface, if the rectangles are sufficiently small, the error also will be small. Dick -- Richard Grier, Consultant, Hard & Software 12962 West Louisiana Avenue Lakewood, CO 80228 303-986-2179 (voice) Homepage: www.hardandsoftware.net Author of Visual Basic Programmer's Guide to Serial Communications, 4th Edition ISBN 1-890422-28-2 (391 pages) published July 2004, Revised July 2006.
ms sql # temp table - invalid object name in data source
Any willing to help with reportviewer control in web project? Outlook 2007--checking if a folder exists Threading question - ensure execution of a block of code A few basic questions for a newb coming from VB6 Add image over other images Microsoft Responds to the Evolution of Online Communities Microsoft Responds to the Evolution of Online Communities Microsoft Responds to the Evolution of Online Communities Registry Access |
|||||||||||||||||||||||