492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
|
(let* ((prev-font (canvas-font cnv))
(font-changed (and font (not (equal? font prev-font)))))
(if font-changed (canvas-font-set! cnv font))
(canvas-text! cnv (+ 2 llx)(+ 2 lly) text)
(let-values (((xmax ymax)(canvas-text-size cnv text)))
(set! text-xmax xmax)(set! text-ymax ymax))
(if font-changed (canvas-font-set! cnv prev-font))))))
(print "text-xmax: " text-xmax " text-ymax: " text-ymax)
(if (vg:obj-extents obj)
(vg:obj-extents obj)
(if (not text)
pts
(if (and text-xmax text-ymax)
(let ((xt (list llx lly
(max ulx (+ llx text-xmax))
|
|
|
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
|
(let* ((prev-font (canvas-font cnv))
(font-changed (and font (not (equal? font prev-font)))))
(if font-changed (canvas-font-set! cnv font))
(canvas-text! cnv (+ 2 llx)(+ 2 lly) text)
(let-values (((xmax ymax)(canvas-text-size cnv text)))
(set! text-xmax xmax)(set! text-ymax ymax))
(if font-changed (canvas-font-set! cnv prev-font))))))
;; (print "text-xmax: " text-xmax " text-ymax: " text-ymax)
(if (vg:obj-extents obj)
(vg:obj-extents obj)
(if (not text)
pts
(if (and text-xmax text-ymax)
(let ((xt (list llx lly
(max ulx (+ llx text-xmax))
|
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
|
(let* ((prev-font (canvas-font cnv))
(font-changed (and font (not (equal? font prev-font)))))
(if font-changed (canvas-font-set! cnv font))
(canvas-text! cnv (+ 2 llx)(+ 2 lly) text)
(let-values (((xmax ymax)(canvas-text-size cnv text)))
(set! text-xmax xmax)(set! text-ymax ymax))
(if font-changed (canvas-font-set! cnv prev-font))))))
(print "text-xmax: " text-xmax " text-ymax: " text-ymax)
(if (vg:obj-extents obj)
(vg:obj-extents obj)
(if (not text)
pts
(if (and text-xmax text-ymax)
(let ((xt (list llx lly
(max ulx (+ llx text-xmax))
|
|
|
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
|
(let* ((prev-font (canvas-font cnv))
(font-changed (and font (not (equal? font prev-font)))))
(if font-changed (canvas-font-set! cnv font))
(canvas-text! cnv (+ 2 llx)(+ 2 lly) text)
(let-values (((xmax ymax)(canvas-text-size cnv text)))
(set! text-xmax xmax)(set! text-ymax ymax))
(if font-changed (canvas-font-set! cnv prev-font))))))
;; (print "text-xmax: " text-xmax " text-ymax: " text-ymax)
(if (vg:obj-extents obj)
(vg:obj-extents obj)
(if (not text)
pts
(if (and text-xmax text-ymax)
(let ((xt (list llx lly
(max ulx (+ llx text-xmax))
|