ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
06-07-2010 09:15 AM
06-08-2010 05:32 PM
Hi Marsee,
I'm not sure how you would force theuser to make the lines both the same length. However, why do you need this functionality? Are you trying to do some processing later in your program and running into problems with the array sizes?
06-09-2010 07:02 AM
The Chancenator wrote:Hi Marsee,
I'm not sure how you would force theuser to make the lines both the same length. However, why do you need this functionality?
Hi, Marti,
Very very strange question. The user need such functionality, because frustrated with different line length which is depends from the line direction.
So, it depends from the method for pixel counting. When line strictly horizontal or vertical, then each pixel behind of line inserted into array. But when line is diagonal, then some pixels crossed partially. So, not all pixels added to result and resulting line length is shorter than original (but take a note - if you will measure length of the line with measurement tape, then bots exactly the same):
Butr we can calculate triue length and then interpolate, quick and dirty something like that:
Now both profiles are the same:
Hope it helps,
with best regards,
Andrey.