Google
  Web www.spinics.net

Re: script-FU console query

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


Sven Neuman wrote:
> 
> On Sat, 2007-01-13 at 20:33 -0800, Saul Goode wrote:
> 
> > Note that you will see no change in the display; even if you were to
> > perform a 'gimp-displays-flush'. 
> 
> If that is true, then this is a bug and needs to be fixed. Can you
> provide a test script that illustrates the problem?

Step #1: Create a new image with a white background (any size will do)
and zoom in to the upper left corner. 

Step #2: Open the Script-fu console and enter the following commands
(the number "1" in the first line assumes the new image is the first one
created after opening the GIMP; substitute the appropriate image-IDnum
from the window's titlebar if this is not the case):

  (define image 1)
  (define layer (car (gimp-image-get-active-layer image)))
  (gimp-drawable-set-pixel layer 1 1 3 (cons-array 3 'byte))

Note that at this point, the pixel at location x=1, y=1 has "internally"
been painted BLACK ('cons-array' initializes to [0,0,0]) but the display
has not been updated.

Step #3: Enter the following line in the console:

  (gimp-displays-flush)

Note that the display is not updated -- this is somewhat anomalous (but
then Script-fu is not often used to paint on a pixel-by-pixel basis).

Step #4: Hide and then unhide the layer by toggling its "eyeball" in the
Layers window. At this point the projection is updated to reflect that
the pixel at [1,1] has been painted black.

--------
"It is amazing what you can accomplish if you do 
not care who gets the credit." -- Harry S. Truman

_______________________________________________

Gimp-user@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

[Gimp Announce]     [Gimp Images]     [GIMP Development]     [Video For Linux]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Yosemite Book Store]     [gtk]     [KDE]     [Scanner]     [Gimp's Home]     [Gimp Docs]     [Gimp on Windows]     [Steve's Art]     [Webcams]     [Share Your Images]     [Free Online Dating]     [Script Fu]

Add to Google amazon