Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -1899,11 +1899,11 @@ ;; all runs stored in runslib library (let ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num))) (if tabdat (let* ((row-height 10) (drawing (dboard:tabdat-drawing tabdat)) - (runslib (vg:get/create-lib drawing "runslib"))) + (runslib (vg:get/create-lib drawing "runslib"))) ;; creates and adds lib (update-rundat tabdat "%" ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%") 100 ;; (dboard:tabdat-numruns tabdat) "%" ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%") ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "item-name" "%") @@ -1913,11 +1913,12 @@ (let ((val (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) key #f))) (if val (set! res (cons (list key val) res)))))) (dboard:tabdat-dbkeys tabdat)) res)) (let ((allruns (dboard:tabdat-allruns tabdat)) - (rowhash (make-hash-table))) ;; store me in tabdat + (rowhash (make-hash-table)) ;; store me in tabdat + (cnv (dboard:tabdat-cnv tabdat))) (print "allruns: " allruns) (for-each (lambda (rundat) (if (vector? rundat) (let* ((run (vector-ref rundat 0)) @@ -1941,44 +1942,43 @@ (lambda (testdat) (let* ((event-time (/ (db:test-get-event_time testdat) 60.0)) (run-duration (/ (db:test-get-run_duration testdat) 60.0)) (end-time (+ event-time run-duration)) (test-name (db:test-get-testname testdat)) - (item-path (db:test-get-item-path testdat))) + (item-path (db:test-get-item-path testdat)) + (test-fullname (conc test-name "/" item-path))) (let loop ((rownum 0)) (if (dashboard:row-collision rowhash rownum event-time end-time) (loop (+ rownum 1)) (let* ((lly (* rownum row-height)) (uly (+ lly row-height))) (dashboard:add-bar rowhash rownum event-time end-time) (vg:add-objs-to-comp runcomp (vg:make-rect event-time lly end-time uly))))) ;; (print "test-name: " test-name " event-time: " event-time " run-duration: " run-duration) )) - testsdat))) - ;; instantiate the component - (let-values (((sizex sizey sizexmm sizeymm) (canvas-size cnv)) - ((originx originy) (canvas-origin cnv))) - (let* ((extents (vg:component-get-extents runcomp)) - (llx (list-ref extents 0)) - (lly (list-ref extents 1)) - (ulx (list-ref extents 2)) - (uly (list-ref extents 3)) - ;; move the following into mapping functions in vg.scm - (deltax (- llx ulx)) - (scalex (/ sizex deltax)) - (sllx (* scalex llx)) - (offx (- sllx originx)) - - - - - ) + testsdat) + ;; instantiate the component + (let-values (((sizex sizey sizexmm sizeymm) (canvas-size cnv)) + ((originx originy) (canvas-origin cnv))) + (let* ((extents (vg:components-get-extents runcomp)) + (llx (list-ref extents 0)) + (lly (list-ref extents 1)) + (ulx (list-ref extents 2)) + (uly (list-ref extents 3)) + ;; move the following into mapping functions in vg.scm + (deltax (- llx ulx)) + (scalex (/ sizex deltax)) + (sllx (* scalex llx)) + (offx (- sllx originx))) + (print "llx: " llx " lly: " lly "ulx: " ulx " uly: " uly " deltax: " deltax " scalex: " scalex " sllx: " sllx " offx: " offx) + (print " run-full-name: " run-full-name) + (vg:instantiate drawing "runslib" run-full-name "wrongname" offx 0 scalex: scalex scaley: 1)))))) allruns) - (vg:drawing-cnv-set! (dboard:tabdat-drawing tabdat)(dboard:tabdat-cnv tabdat)) ;; cnv-obj) - (canvas-clear! (dboard:tabdat-cnv tabdat)) ;; -obj) - (vg:draw (dboard:tabdat-drawing tabdat)) - )) + (vg:drawing-cnv-set! (dboard:tabdat-drawing tabdat)(dboard:tabdat-cnv tabdat)) ;; cnv-obj) + (canvas-clear! (dboard:tabdat-cnv tabdat)) ;; -obj) + (vg:draw (dboard:tabdat-drawing tabdat) #t) + )) (print "no tabdat for run-times-tab-updater")))) (define (dashboard:runs-tab-updater commondat tab-num) (let ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num))) (update-rundat tabdat (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%") (dboard:tabdat-numruns tabdat) Index: vg-test.scm ================================================================== --- vg-test.scm +++ vg-test.scm @@ -40,12 +40,12 @@ ;; (define big-xtnts (vg:instances-get-extents d1)) (vg:add-objs-to-comp c2 (apply vg:make-rect big-xtnts)) (vg:instantiate d1 "firstlib" "secondcomp" "inst3" 0 0) -(vg:drawing-scalex-set! d1 1.8) -(vg:drawing-scaley-set! d1 1.1) +(vg:drawing-scalex-set! d1 1.5) +(vg:drawing-scaley-set! d1 1.5) (define cnv #f) (define the-cnv (canvas #:size "500x400" #:expand "YES" Index: vg.scm ================================================================== --- vg.scm +++ vg.scm @@ -246,11 +246,11 @@ ;; with get-extents = #t return the extents ;; with draw = #f don't actually draw the object ;; (define (vg:draw-obj drawing obj #!key (draw #t)) - (print "obj type: " (vg:obj-type obj)) + ;; (print "obj type: " (vg:obj-type obj)) (case (vg:obj-type obj) ((r)(vg:draw-rect drawing obj draw: draw)))) ;; given a rect obj draw it on the canvas applying first the drawing ;; scale and offset @@ -272,17 +272,17 @@ (lambda (instname) (let* ((inst (hash-table-ref insts instname)) (libname (vg:inst-libname inst)) (compname (vg:inst-compname inst)) (comp (vg:get-component drawing libname compname))) - (print "comp: " comp) + ;; (print "comp: " comp) (for-each (lambda (obj) - (print "obj: " (vg:obj-pts obj)) + ;; (print "obj: " (vg:obj-pts obj)) (let ((obj-xfrmd (vg:map-obj drawing inst obj))) - (print "obj-xfrmd: " (vg:obj-pts obj-xfrmd)) + ;; (print "obj-xfrmd: " (vg:obj-pts obj-xfrmd)) (set! res (cons (vg:draw-obj drawing obj-xfrmd draw: draw-mode) res)))) ;; (vg:comp-objs comp)))) (if (null? instnames) (hash-table-keys insts) instnames)) res)) ;; (hash-table-values insts))))