(define (ak-zoom-to)
(let* (
        (bounds (plug-in-ak-bbox-image))
        (ak_bound_x (nth 0 bounds))
        (ak_bound_y (nth 1 bounds))
        (ak_bound_width (nth 2 bounds))
        (ak_bound_height (nth 3 bounds))
        (d_width (car (gimp-drawable-width draw)))
        (d_height (car (gimp-drawable-height draw)))
        (d_offsets (gimp-drawable-offsets draw))
        ;(brush (car (gimp-context-get-brush)))
        (stroke "10 36 107")
        (brush "Circle Fuzzy (03)")
        (opacity "50")
        (brush_info (gimp-brush-get-info brush))
        (d_x (- (nth 0 d_offsets)  (* (nth 0 brush_info) 0.5)))
        (d_y (- (nth 1 d_offsets)  (* (nth 1 brush_info) 0.5)))
        (d_x2 (+ d_x d_width (nth 0 brush_info)))
        (d_y2 (+ d_x d_height (nth 1 brush_info)))
        (c_x) (c_y) (c_x2) (c_y2)
        (ak_bound_x2) (ak_bound_y2)
        (point 1)
        (control 2)
        (point_new 3)
        (points (cons-array 72 'double))
        (d 0) ;delta
        (pathname "ZoomCursor")
        (current_path (car (gimp-path-get-current image)))
        (tmp)
      )
  (if (< av 0)
    (set! av 0)
  )
  (if (> av 1)
    (set! av 1)
  )

  (set! ak_bound_x2 (+ ak_bound_x ak_bound_width))
  (set! ak_bound_y2 (+ ak_bound_y ak_bound_height))
  (set! c_x (+ (* (- 1 av) d_x) (* av ak_bound_x)))
  (set! c_y (+ (* (- 1 av) d_y) (* av ak_bound_y)))
  (set! c_x2 (+ (* (- 1 av) d_x2) (* av ak_bound_x2)))
  (set! c_y2 (+ (* (- 1 av) d_y2) (* av ak_bound_y2)))
  ;(alert (list c_x c_y c_x2 c_y2))
  (aset points (+ d 0) c_x)
  (aset points (+ d 1) d_y)
  (aset points (+ d 2) point)
  (aset points (+ d 3) c_x)
  (aset points (+ d 4) d_y)
  (aset points (+ d 5) control)
  (aset points (+ d 6) c_x2)
  (aset points (+ d 7) d_y)
  (aset points (+ d 8) control)
  (aset points (+ d 9) c_x2)
  (aset points (+ d 10) d_y)
  (aset points (+ d 11) point)
  (aset points (+ d 12) c_x2)
  (aset points (+ d 13) d_y)
  (aset points (+ d 14) control)

  (aset points (+ d 15) c_x2)
  (aset points (+ d 16) d_y2)
  (aset points (+ d 17) control)
  (aset points (+ d 18) c_x2)
  (aset points (+ d 19) d_y2)
  (aset points (+ d 20) point)
  (aset points (+ d 21) c_x2)
  (aset points (+ d 22) d_y2)
  (aset points (+ d 23) control)

  (aset points (+ d 24) c_x)
  (aset points (+ d 25) d_y2)
  (aset points (+ d 26) control)
  (aset points (+ d 27) c_x)
  (aset points (+ d 28) d_y2)
  (aset points (+ d 29) point)
  (aset points (+ d 30) c_x)
  (aset points (+ d 31) d_y2)
  (aset points (+ d 32) control)
  (aset points (+ d 33) c_x)
  (aset points (+ d 34) d_y)
  (aset points (+ d 35) control)
  
  (set! d 36)
  (aset points (+ d 0) d_x)
  (aset points (+ d 1) c_y)
  (aset points (+ d 2) point_new)
  (aset points (+ d 3) d_x)
  (aset points (+ d 4) c_y)
  (aset points (+ d 5) control)
  (aset points (+ d 6) d_x2)
  (aset points (+ d 7) c_y)
  (aset points (+ d 8) control)
  (aset points (+ d 9) d_x2)
  (aset points (+ d 10) c_y)
  (aset points (+ d 11) point)
  (aset points (+ d 12) d_x2)
  (aset points (+ d 13) c_y)
  (aset points (+ d 14) control)

  (aset points (+ d 15) d_x2)
  (aset points (+ d 16) c_y2)
  (aset points (+ d 17) control)
  (aset points (+ d 18) d_x2)
  (aset points (+ d 19) c_y2)
  (aset points (+ d 20) point)
  (aset points (+ d 21) d_x2)
  (aset points (+ d 22) c_y2)
  (aset points (+ d 23) control)

  (aset points (+ d 24) d_x)
  (aset points (+ d 25) c_y2)
  (aset points (+ d 26) control)
  (aset points (+ d 27) d_x)
  (aset points (+ d 28) c_y2)
  (aset points (+ d 29) point)
  (aset points (+ d 30) d_x)
  (aset points (+ d 31) c_y2)
  (aset points (+ d 32) control)
  (aset points (+ d 33) d_x)
  (aset points (+ d 34) c_y)
  (aset points (+ d 35) control)
  
  (gimp-path-set-points image pathname 1 72 points)
  (set! pathname (car (gimp-path-get-current image)))
  (gimp-path-set-current image pathname)
  (plug-in-ak-path-set-style-attribute image pathname "stroke" stroke)
  (plug-in-ak-path-set-style-attribute image pathname "stroke-brush" brush)
  (plug-in-ak-path-set-style-attribute image pathname "opacity" opacity)
  (plug-in-ak-path-draw-current 2 image draw 0)
  ;(gimp-context-push)
  ;(gimp-context-set-foreground stroke)
  ;(gimp-context-set-brush brush)
  ;(gimp-path-stroke-current image)
  (gimp-path-delete image pathname)
  (gimp-path-set-current image current_path)
  ;(gimp-context-pop)

))
(ak-zoom-to)
