[Gimp-user] gimp-drawable-curves-spline
- From: Maurizio Loreti <maurizio loreti gmail com>
- To: gimp-user-list gnome org
- Subject: [Gimp-user] gimp-drawable-curves-spline
- Date: Wed, 24 Feb 2016 16:49:12 +0100
On 24 feb 2016, at 16:29, Kevin Payne <paynekj hotmail com <mailto:paynekj hotmail com>> wrote:
(which appear to be mostly the same, other than the control points have changed from being INT to FLOAT)
OK - well, my scheme knowledge is not enough :-( Here is the relevant section of the code:
(define (spline)
(let* ((a (cons-array 8 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 63 60)
(set-pt a 2 191 194)
(set-pt a 3 255 255)
a))
(define (set-pt a index x y)
(prog1
(aset a (* index 2) x)
(aset a (+ (* index 2) 1) y)))
(gimp-curves-spline inDrw 0 8 (spline))
Just changing the procedure name in the last line to gimp-drawable-curves-spline is not enough. If I
understand correctly, the program allocates an array of 8 bytes where 8 integer values (0,0; 63,60; 191,194;
155.255) are stored. The memory to be allocated should be adequate for 8 floating point values (8 * 32
bytes?), and the values stored there. Is set-pt adequate? Or intended for integer values only? May
somebody help me?
--
Maurizio Loreti - Maurizio Loreti gmail com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]