;;; Procedure: ;;; no-failure ;;; Parameters: ;;; none ;;; Purpose: ;;; Creates a new image with the universal sign for "No Fs" ;;; Produces: ;;; Nothing. You call this only for the side effect of ;;; drawing a new image. ;;; Preconditions: ;;; Must be called from within Script-Fu. ;;; Postconditions: ;;; A new image appears on the screen. (define no-failure (lambda () ; Draw everything on white (set-bgcolor WHITE) (let ((image (create-image 256 256))) ; Draw the silly letter F in blue (set-fgcolor BLUE) (set-brush "Circle (11)") (line image 96 40 176 40) ; Top stroke (line image 96 40 96 216) ; Down stroke (line image 96 112 148 112) ; Middle stroke ; Draw a nice red circle. (set-fgcolor RED) (set-brush "Circle (07)") (select-ellipse image REPLACE 8 8 240 240) (stroke image) (select-nothing image) ; Now we're ready to draw the slash. Basic math tells us that ; the endpoints are offset by radius/(sqrt 2) from the center ; of the circle. (let* ((center 128) (radius 120) (offset (/ radius (sqrt 2)))) (line image (- center offset) (- center offset) (+ center offset) (+ center offset))) ; And display the image (show-image image))))