Re: [Gimp-user] 'Precision' Meaning
- From: Ofnuts <ofnuts gmx com>
- To: gimp-user-list gnome org
- Subject: Re: [Gimp-user] 'Precision' Meaning
- Date: Mon, 31 Oct 2016 01:53:14 +0100
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]