On Wed, 2008-01-02 at 21:09 -0200, John Coppens wrote: > The script is supposed to add a title on a selected place, and worked > fine under 2.2.x. Now, the text appears as a new layer, but the color > isn't right, the layer seems blocked (cannot select another layer)while > it's still floating, the combination mode (addition/subtraction) is not > respected and the command in the script to flatten the image is not > executed. > > No errors appear, but something did go wrong... > I guess your problem comes from the commands in the declarations statement of the let*
[SNIP] (let* ( (width (car (gimp-drawable-width drawable))) [SNIP] (text-x (cond ((= just 0) xmargin) ; left ((= just 1) (/ (- width fwidth) 2)) ; middle ((= just 2) (- width xmargin fwidth)) ; right ) ) ) ;; closing the declarations here. (gimp-image-undo-group-start image) (gimp-context-set-foreground color) (define layer (car (gimp-text-fontname image drawable ;; ^^^^^^ added a define as layer has comed out of declarations. text-x text-y text 0 1 fontsize POINTS fontname) ) ) (gimp-layer-set-mode layer (cond ((= mode 0) NORMAL-MODE) ((= mode 1) ADDITION-MODE) ((= mode 2) SUBTRACT-MODE) ) ) (gimp-layer-set-opacity layer alpha) (gimp-image-flatten image) (gimp-image-undo-group-end image) (gimp-displays-flush) ) ;; ) closing the let* here. ) _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user