On 31/10/16 00:52, FierySwordswoman wrote:
When creating a script for GIMP, using something like
stroke.get_point_at_dist(...)
it requires 2 floats: distance and 'precision for estimation'.
What does 'precision for estimation' mean?

The point coordinates are obtained by an iterative algorithm that must be stopping when further iteration do not change the coordinates by some precision amount.

Typically I use .1 for the simple cases, and .1/N when I want a bit more accuracy, N being the number of anchors in the stroke.

Keep in mind that if you use the value of pdb.gimp_vectors_stroke_get_length(...) in pdb.gimp_vectors_stroke_get_point_at_dist(...) you may well get an invalid result (valid=False). I often use a facade method that returns the coordinates of the last anchor in this case.





_______________________________________________
gimp-user-list mailing list
List address:    gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list

Reply via email to