Re: Improvement for measurement tool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 5, 2009 at 9:51 AM, DirkSohler<gimp-developer-ml@xxxxxxxxxxxxxx> wrote:> -----BEGIN PGP SIGNED MESSAGE-----> Hash: SHA1>> Hi there!>> I filed a “bug” with an enhancement request to the GIMP Bugzilla, but> Martin Nordholts told me, to send a mail to the GIMP developers mailing> list first, so … here it is :)>>> I had a kind of map opened as image in GIMP. I used the path tool and> clicked a path alon a route i want to measure. After i did this i tried> to get the path’s length. But i noticed really soon, that it is not> possible to output the path’s total length without learning script-fu.
Hmm - it would probably not be too hard to write a plugin for this.
As a quick test, I created a new image, drew a path, and stroked it.
Then I opened the python console and did:
>>> img = gimp.image_list()[0]>>> path = pdb.gimp_image_get_active_vectors(img)>>> len = pdb.gimp_vectors_stroke_get_length(path, 1, 1)>>> print len644.628491517
That might choke if you have more than one path - I have not tested.
Is this enough to get you going?
Chris_______________________________________________Gimp-developer mailing listGimp-developer@xxxxxxxxxxxxxxxxxxxxxxxxxxx://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux