Re: [Gimp-user] create a custom tool or run script at cursor?
- From: Rob Antonishen <rob antonishen gmail com>
- To: Dexter Filmore <Dexter Filmore gmx de>
- Cc: gimp-user-list gnome org
- Subject: Re: [Gimp-user] create a custom tool or run script at cursor?
- Date: Tue, 13 Nov 2012 14:49:47 -0500
That would actually work almost quite as well if one can get the script only
to do things at the nodes. Possible?
Sure - here is a script that labels each point of a node:
http://ffaat.poweredbyclear.com/incoming/scripts/RMA_label_points.scm
The key chunk you are interested in is here:
; get all the points in the path as a ((x1 x1) (x2 y2) ...) list
(while (< counter numstrokes) ; for each stroke in the path
(set! points (caddr (gimp-vectors-stroke-get-points inPath (vector-ref strokelist counter))))
(set! numpoints (/ (cadr (gimp-vectors-stroke-get-points inPath (vector-ref strokelist counter))) 6))
(let
((pcount 0))
(while (< pcount numpoints)
(set! pointlist (append pointlist (list (list (vector-ref points (+ (* pcount 6) 2)) (vector-ref points (+ (* pcount 6) 3))))))
(set! pcount (+ pcount 1))
)
)
(set! counter (+ counter 1))
)
Of course, it needs a few defines up front....
-Rob A>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]