English 中文(简体)
为什么不按正确的顺序执行?
原标题:Scriptfu not executing in the correct order, Why?

我试图为全球化学品统一分类标签制度撰写基本文字,但似乎不想工作。 在我作出选择之后,安理会应该遵循这一命令: 低活性层、扩大选择2px、洪水填满/地面彩色,提高了活性层。 最终产品应当是我对上层线的坚实彩色灯塔。 但是,《守则》一写道,它跳出活跃的层次,但顶层的洪水却不是以下。 这里,我有:

(define (quick-fill image drawable)
  (gimp-undo-push-group-start image)
  (let* ((layer (car (gimp-image-get-active-layer image))))
    (gimp-selection-grow image 2)
    (gimp-image-set-active-layer image (aref (cadr (gimp-image-get-layers image)) 1))
    (gimp-bucket-fill drawable FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
    (gimp-image-set-active-layer image (aref (cadr (gimp-image-get-layers image)) 0)))
  (gimp-undo-push-group-end image)
  (gimp-displays-flush))
问题回答

如果你试图通过在以下一层填满(至少是你试图去做的)地表上填充,使位于目前一层物体周围的2-pixel边界成为一种过滤器,则试图做到:

(define (quick-fill image)
  (gimp-undo-push-group-start image)
  (gimp-selection-grow image 2)
  (gimp-image-set-active-layer image (aref (cadr (gimp-image-get-layers image)) 1))
  (let* ((active-drawable (car (gimp-image-get-active-drawable image))))
    (gimp-bucket-fill active-drawable FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
    (gimp-image-set-active-layer image (aref (cadr (gimp-image-get-layers image)) 0)))
  (gimp-undo-push-group-end image)
  (gimp-displays-flush))

两点说明:

(1) 从未使用<代码>layer 页: 1

2) Gimp don t提取或填满,或与活性层做任何事情......相反,它利用活性代用。 如果你想要在下层填补顶层,那么,这意味着你能够重新进入顶层,从而填补上层......将活性层移至下层,不会改变过来的可用价值。 因此,在这项修改中,I ve创建了一个新的<代码>可操作的。 let* 部分中的变量,这些变量已初步形成至目前使用的,<>>后,您将活性层从上层改为下层。 这样,你就可以重新填补以下的层,而不是原封不动的顶层。 事实上,你根本不需要通过一个可以推断的论点,因为你们可以从活跃的层面(这是这一修改中所做的事)获得新的教训。





相关问题
Lisp code called from Java

Long story: I am doing a project for my functional programing class, and I thought of writing an AI controller in Lisp, for the Mario AI competition. I was looking over frameworks/libraries/ways of ...

Emacs, Zen-Coding mode, and Putty

I use emacs via Putty and since Putty doesn t send certain key combinations to the remote console I generally need to re-bind them to other key combinations. After installing the amazing Zen-Coding ...

In Which Cases Is Better To Use Clojure? [closed]

I develop in Lisp and in Scheme, but I was reading about Clojure and then I want to know, in which cases is better to use it than using Lisp or Scheme? Thanks

lambda-gtk negative pointer

I was trying to write my own put-pixel on (Gdk) pixbuf in Lisp. When I finally realized how I can operate on C pointers in CL, new obstacle came along - (gdk:pixbuf-get-pixels pb) returns me negative ...

Is there a common lisp package naming convention?

I have created some of my own user packages and have run into a name clash. In Java, the naming convention is to use your domain name in the package name: e.g. import com.example.somepackage;. Are ...

SOAP request from within an AutoLISP/AutoCAD macro

We have built a webservice for a client that uses AutoCAD. They have a macro that runs in AutoCAD that builds a SOAP request. But they have not figured out how to actually send() the soap request to ...