Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
length of a path
#3
It would sort of work, but... the last parameter in stroke_get_length is a precision. This is necessary because the length of a Bezier curve cannot be computed directly, it is approximated iteratively until the value doesn't change (within the precision). And when you add imprecise things, the result is even more imprecise. So if you start with one pixel on the strokes you could have several pixels of error on the whole path. Of course, using a very good precision (0.001) is not innocuous, the algorithm iterates more and takes longer (though on modern machine you may hardly notice it)
Reply


Messages In This Thread
length of a path - by dinasset - 05-19-2017, 03:54 AM
RE: length of a path - by dinasset - 05-19-2017, 05:08 AM
RE: length of a path - by Ofnuts - 05-19-2017, 06:19 AM
RE: length of a path - by dinasset - 05-19-2017, 08:02 AM
RE: length of a path - by Ofnuts - 05-19-2017, 11:50 AM
RE: length of a path - by dinasset - 05-20-2017, 05:08 PM

Forum Jump: