Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Gimp/plug-ins/script-fu/test/tests/PDB/item/   (Gimp Bildeditor Version 3.2.0©)  Datei vom 14.2.2026 mit Größe 1 kB image not shown  

Quelle  item-position.scm  Sprache: unbekannt

 
Spracherkennung für: .scm vermutete Sprache: Lisp {Lisp[25] Masm[25] MT940[25]} [Methode: maximale Elemente, drei Dimensionen]

; test Item methods for positioning in stack

; This tests that all calls minimally work.
; TODO test stack semantics i.e. algebra of stacking operations.

; All the calls named for layer, channel, vectors are deprecated
; in favor of these more generic "item" calls



; setup
(define testImage (testing:load-test-image "gimp-logo.png"))
(define testLayer (vector-ref (car (gimp-image-get-layers testImage ))
                                  0))




; position of single layer is index zero
(assert `(= (car (gimp-image-get-item-position ,testImage ,testLayer))
            0))


; Single layer is both at top and at bottom of stack and cannot be raised or lowered
(assert-error `(gimp-image-raise-item ,testImage ,testLayer)
              "Procedure execution of gimp-image-raise-item failed: Layer cannot be raised higher. ")

(assert-error `(gimp-image-lower-item ,testImage ,testLayer)
              "Procedure execution of gimp-image-lower-item failed: Layer cannot be lowered more. ")



; Can raise to top and bottom without throwing error, but no effect
(assert `(gimp-image-raise-item-to-top ,testImage ,testLayer))

(assert `(gimp-image-lower-item-to-bottom ,testImage ,testLayer))


; FIXME API naming inconsistent: should image-reorder-item => image-item-reorder

; Cannot reorder an item to make parent itself
(assert-error `(gimp-image-reorder-item ,testImage ,testLayer ,testLayer 0)
              "Procedure execution of gimp-image-reorder-item failed on invalid input arguments:"  )
; " Item 'Background' (2) cannot be used because it is not a group item"





[Dauer der Verarbeitung: 0.2 Sekunden, vorverarbeitet 2026-10-27]