Megatest

Diff
Login

Differences From Artifact [2f4cfbf9d9]:

To Artifact [e48e59b042]:


369
370
371
372
373
374
375
376
377
378



379
380
381
382
383
384
385



386
387
388
389
390
391
392
369
370
371
372
373
374
375



376
377
378
379
380
381
382



383
384
385
386
387
388
389
390
391
392







-
-
-
+
+
+




-
-
-
+
+
+







    (arithmetic-shift r 16)
    (arithmetic-shift g 8)
    b))

;; Obsolete function
;;
(define (vg:generate-color)
  (vg:rgb->number (random 255)
                  (random 255)
                  (random 255)))
  (vg:rgb->number (pseudo-random-integer 255)
                  (pseudo-random-integer 255)
                  (pseudo-random-integer 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))))
  (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
;;======================================================================