mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 12:32:37 +00:00
pop the context before rendering the gradient so we draw the gradient with
2006-09-01 Michael Natterer <mitch@gimp.org> * plug-ins/script-fu/scripts/gradient-example.scm: pop the context before rendering the gradient so we draw the gradient with the user's colors, not with the ones the script uses temporarily.
This commit is contained in:
parent
d999499640
commit
4233734b86
|
@ -1,3 +1,9 @@
|
|||
2006-09-01 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* plug-ins/script-fu/scripts/gradient-example.scm: pop the context
|
||||
before rendering the gradient so we draw the gradient with the
|
||||
user's colors, not with the ones the script uses temporarily.
|
||||
|
||||
2006-09-01 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
This commit *should* fix the remaining missing contexts for
|
||||
|
|
|
@ -31,17 +31,19 @@
|
|||
(fg-color (* 255 (/ 2 3)))
|
||||
(bg-color (* 255 (/ 1 3))))
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-add-layer img drawable 0)
|
||||
|
||||
; Render background checkerboard
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-context-set-foreground (list fg-color fg-color fg-color))
|
||||
(gimp-context-set-background (list bg-color bg-color bg-color))
|
||||
(plug-in-checkerboard 1 img drawable 0 8)
|
||||
|
||||
(gimp-context-pop)
|
||||
|
||||
; Render gradient
|
||||
|
||||
(gimp-edit-blend drawable CUSTOM-MODE NORMAL-MODE
|
||||
|
@ -51,9 +53,7 @@
|
|||
|
||||
; Terminate
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)))
|
||||
(gimp-display-new img)))
|
||||
|
||||
(script-fu-register "script-fu-gradient-example"
|
||||
_"Render _Image..."
|
||||
|
|
Loading…
Reference in a new issue