Changeset 3667

Show
Ignore:
Timestamp:
07/28/08 21:09:03 (4 months ago)
Author:
ksprotte
Message:

removed allocation-area-gfx-handler (not needed anymore and causing a warning due to undefined function make-vga-colors)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/projects/bos/web/allocation-area-handlers.lisp

    r3656 r3667  
    9595  (with-bos-cms-page (:title "Allocation area has been deactivated") 
    9696    (:h2 "The allocation area has been deactivated"))) 
    97  
    98 (defclass allocation-area-gfx-handler (editor-only-handler object-handler) 
    99   ()) 
    100  
    101 (defmethod handle-object ((handler allocation-area-gfx-handler) allocation-area) 
    102   (cl-gd:with-image* ((allocation-area-width allocation-area) 
    103                       (allocation-area-height allocation-area) t) 
    104     (with-slots (left top width height) allocation-area 
    105       (let ((colors (make-vga-colors)) 
    106             (vertices (mapcan #'(lambda (point) (list (- (car point) left) 
    107                                                       (- (cdr point) top))) 
    108                               (coerce (allocation-area-vertices allocation-area) 'list)))) 
    109         (loop with dest-y = 0 
    110            for y = (+ top dest-y) 
    111            for tile-y = (* 90 (floor y 90)) 
    112            until (> tile-y (+ top height)) 
    113            for copy-height = (cond 
    114                                ((< tile-y top) 
    115                                 (+ 90 (- tile-y top))) 
    116                                ((> (+ tile-y 90) (+ top height)) 
    117                                 (- (+ tile-y 90) (+ top height))) 
    118                                (t 
    119                                 90)) 
    120            for source-y = (if (< tile-y top) (- 90 copy-height) 0) 
    121            do (loop with dest-x = 0 
    122                  for x = (+ left dest-x) 
    123                  for tile-x = (* 90 (floor x 90)) 
    124                  until (> tile-x (+ left width)) 
    125                  for copy-width = (cond 
    126                                     ((< tile-x left) 
    127                                      (+ 90 (- tile-x left))) 
    128                                     ((> (+ tile-x 90) (+ left width)) 
    129                                      (- (+ tile-x 90) (+ left width))) 
    130                                     (t 
    131                                      90)) 
    132                  for source-x = (if (< tile-x left) (- 90 copy-width) 0) 
    133                  do (cl-gd:copy-image (image-tile-image (get-map-tile x y)) 
    134                                       cl-gd:*default-image* 
    135                                       source-x source-y 
    136                                       dest-x dest-y 
    137                                       copy-width copy-height) 
    138                  do (incf dest-x copy-width)) 
    139            do (incf dest-y copy-height)) 
    140         (cl-gd:draw-polygon vertices :color (elt colors 1)) 
    141         (emit-image-to-browser cl-gd:*default-image* :png))))) 
    14297 
    14398(defclass create-allocation-area-handler (admin-only-handler form-handler) 
  • trunk/projects/bos/web/webserver.lisp

    r3658 r3667  
    185185                                        ("/sponsor-login" sponsor-login-handler) 
    186186                                        ("/create-allocation-area" create-allocation-area-handler) 
    187                                         ("/allocation-area-gfx" allocation-area-gfx-handler) 
    188187                                        ("/allocation-area" allocation-area-handler) 
    189188                                        ("/allocation-cache" allocation-cache-handler)