Megatest

Diff
Login

Differences From Artifact [2e376f7175]:

To Artifact [13261795fe]:


19
20
21
22
23
24
25
26






27
28
29
30
31
32
33
34
35
36
;;  strftime('%m/%d/%Y %H:%M:%S','now','localtime')

(declare (unit vgmod))

(module vgmod
    *
  
(import scheme chicken data-structures extras ports)






(use canvas-draw iup)
(use typed-records srfi-1 srfi-69)
(import canvas-draw-iup)

(include "vg_records.scm")

;; ;; structs
;; ;;
;; (defstruct vg:lib     comps)
;; (defstruct vg:comp    objs name file)







|
>
>
>
>
>
>
|
|
<







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

35
36
37
38
39
40
41
;;  strftime('%m/%d/%Y %H:%M:%S','now','localtime')

(declare (unit vgmod))

(module vgmod
    *
  
    (import scheme
	    chicken.base
	    chicken.bitwise
	    chicken.string
	    chicken.random
	    )
    
(import canvas-draw iup)
(import typed-records srfi-1 srfi-69)


(include "vg_records.scm")

;; ;; structs
;; ;;
;; (defstruct vg:lib     comps)
;; (defstruct vg:comp    objs name file)
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
    (arithmetic-shift r 16)
    (arithmetic-shift g 8)
    b))

;; Obsolete function
;;
(define (vg:generate-color)
  (vg:rgb->number (random 255)
                  (random 255)
                  (random 255)))

;; Need to return a string of random iup-color for graph
;;
(define (vg:generate-color-rgb)
  (conc (number->string (random 255)) " "
        (number->string (random 255)) " "
        (number->string (random 255))))

(define (vg:iup-color->number iup-color)
  (apply vg:rgb->number (map string->number (string-split iup-color))))

;;======================================================================
;; graphing
;;======================================================================







|
|
|

|


|
|
|







386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
    (arithmetic-shift r 16)
    (arithmetic-shift g 8)
    b))

;; Obsolete function
;;
(define (vg:generate-color)
  (vg:rgb->number (pseudo-random-integer 255)
                  (pseudo-random-integer 255)
                  (pseudo-random-integer 255)))

;; Need to return a string of pseudo-random-integer iup-color for graph
;;
(define (vg:generate-color-rgb)
  (conc (number->string (pseudo-random-integer 255)) " "
        (number->string (pseudo-random-integer 255)) " "
        (number->string (pseudo-random-integer 255))))

(define (vg:iup-color->number iup-color)
  (apply vg:rgb->number (map string->number (string-split iup-color))))

;;======================================================================
;; graphing
;;======================================================================