Thursday, February 11, 2010

Assignment 3

For assingment3 we had to start working on our colorwheel. The first step was to get a gradient working. For this we had to get blue at the top and yellow at the bottom. We worked on getting the gradient working in class with red and on my own I got the blue and yellow working. This is how it turned out:





CODE:
code:
(define img (car (gimp-image-new 512 512 0)))
img
> img
1
> (gimp-display-new img)
(1)
> ;Create new image and display it
> (define layer (car (gimp-layer-new img 512 512 0 "blah" 100 0)))
layer
> (gimp-image-add-layer img layer -1)
(#t)
> ;you define the layer then you add the layer
> (gimp-edit-blend layer 3 0 0 100 0 0 FALSE FALSE 1 0 TRUE 256 0 256 256
> (gimp-edit-blend layer 3 0 0 100 0 0 FALSE FALSE 1 0 TRUE 256 0 256 256)
(#t)
> ;CREATES THE GRADIENT WITH ALL THE CONDITIONS
> (gimp-contex-set-background '(255 0 0))
Error: eval: unbound variable: gimp-contex-set-background
> (gimp-context-set-background '(255 0 0))
(#t)
> ;CHANGE BACKGROUND COLOR
(gimp-edit-blend layer 3 0 0 100 0 0 FALSE FALSE 1 0 TRUE 256 0 256 256)
(gimp-context-set-foreground '(255 255 0))
(gimp-edit-blend layer 3 0 0 100 0 0 FALSE FALSE 1 0 TRUE 256 0 256 256)
(gimp-context-set-background '(0 0 255)
(gimp-edit-blend layer 3 0 0 100 0 0 FALSE FALSE 1 0 TRUE 256 0 256 256)

No comments:

Post a Comment