[noctool-cvs] CVS source
jprewett
jprewett at common-lisp.net
Mon Dec 22 15:28:53 UTC 2008
Update of /project/noctool/cvsroot/source
In directory cl-net:/tmp/cvs-serv25726
Modified Files:
graph-monitors.lisp
Log Message:
added background keyword to SHOW method to specify background color
--- /project/noctool/cvsroot/source/graph-monitors.lisp 2008/12/19 21:14:23 1.7
+++ /project/noctool/cvsroot/source/graph-monitors.lisp 2008/12/22 15:28:53 1.8
@@ -75,9 +75,10 @@
0 0 0))))))))
-(defmethod show ((graph noctool::ping-monitor) sink format &key (selector :short) scale &allow-other-keys)
+(defmethod show ((graph noctool::ping-monitor) sink format &key (selector :short) (background '(240 240 240))
+ scale &allow-other-keys)
(let ((image (image:make-image 350 140)))
- (image:rect image 0 0 349 139 t 240 240 240)
+ (apply #'image:rect image 0 0 349 139 t background)
(multiple-value-bind (percentile max scale)
(show (noctool::graph graph) image format :selector selector :scale scale)
(graph-ignore percentile max scale)
@@ -112,12 +113,12 @@
t (nth 0 color) (nth 1 color)(nth 2 color)))))
image)))
-(defmethod show ((graph noctool::disk-container) sink format &key (selector :short) scale &allow-other-keys)
+(defmethod show ((graph noctool::disk-container) sink format &key (selector :short) (background '(192 192 192)) scale &allow-other-keys)
(graph-ignore scale)
(let ((lines (length (noctool::disk-list graph)))
(disks (sort (copy-list (noctool::disk-list graph)) #'> :key #'noctool::disk-max)))
(let ((image (image:make-image 350 (+ 130 (* 10 lines)))))
- (image:rect image 0 0 349 (1- (image::height image)) t 192 192 192)
+ (apply #'image:rect image 0 0 349 (1- (image::height image)) t background)
(multiple-value-bind (percentile max scale)
(show (noctool::disk-graph (car disks)) image nil
:color '(0 0 0 0.0) :base-x 25 :base-y 110 :height 100
More information about the noctool-cvs
mailing list