test for get-char-width
and get-char-height
This commit is contained in:
parent
bb3265bad0
commit
a5ad0d011e
|
@ -838,6 +838,20 @@
|
||||||
load-file
|
load-file
|
||||||
p)))
|
p)))
|
||||||
|
|
||||||
|
;; ----------------------------------------
|
||||||
|
;; Check `get-char-width` and backing scales:
|
||||||
|
|
||||||
|
(let ([dc1 (send (make-bitmap 10 10) make-dc)]
|
||||||
|
[dc2 (send (make-bitmap 10 10 #:backing-scale 2) make-dc)])
|
||||||
|
;; Sizes don't have to be the same, since they can depend on resolution,
|
||||||
|
;; but they should be close:
|
||||||
|
(test (round (send dc1 get-char-width))
|
||||||
|
'scale-2-width
|
||||||
|
(round (send dc2 get-char-width)))
|
||||||
|
(test (round (send dc1 get-char-height))
|
||||||
|
'scale-2-height
|
||||||
|
(round (send dc2 get-char-height))))
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
;; No error on too-large bitmap:
|
;; No error on too-large bitmap:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user