Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 1.49 KB | None | 0 0
  1. (define (script-fu-full-reflection image layer)
  2.     (gimp-image-undo-group-start image)
  3.  
  4.     (let*
  5.         (
  6.             (x 0)
  7.             (width  (car (gimp-image-width  image)))
  8.             (height (car (gimp-image-height image)))
  9.             (reflection-layer
  10.                 (car
  11.                     (gimp-layer-new
  12.                         image
  13.                         width
  14.                         height
  15.                         RGBA-IMAGE
  16.                         "Reflection"
  17.                         100
  18.                         NORMAL-MODE
  19.                     )
  20.                 )
  21.             )
  22.             (floating-layer)
  23.         )
  24.  
  25.         (gimp-image-add-layer image reflection-layer -1)
  26.  
  27.         (gimp-rect-select
  28.             image
  29.             0 0
  30.             (/ width 2) (/ height 2)
  31.             CHANNEL-OP-REPLACE
  32.             FALSE
  33.             0
  34.         )
  35.  
  36.         (gimp-edit-copy layer)
  37.         (gimp-floating-sel-anchor
  38.             (car
  39.                 (gimp-edit-paste reflection-layer FALSE)
  40.             )
  41.         )
  42.     )
  43.  
  44.     (gimp-displays-flush)
  45.     (gimp-image-undo-group-end image)
  46. )
  47.  
  48. (script-fu-register
  49.     "script-fu-full-reflection"
  50.     "Full R_eflection"
  51.     "Creates realistic reflection of non-flat objects"
  52.     "Zoffix Znet"
  53.     "Copyright 2011, Zoffix Znet"
  54.     "February 9, 2011"
  55.     ""
  56.     SF-IMAGE       "The Image" 0
  57.     SF-DRAWABLE    "The Layer" 0
  58. )
  59.  
  60. (script-fu-menu-register "script-fu-full-reflection" "<Image>/Filters/Artistic")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement