Random pickiness.
Spaces at EOFs, indentation, etc. original commit: 7d6e79023cf9872e6f6af2f89961b742c6296f1d
This commit is contained in:
parent
d0ee91fc1d
commit
67b89ffbb2
|
@ -43,7 +43,7 @@
|
|||
[(pair? M_0) M_0]
|
||||
[else
|
||||
(error 'visible% "expects matrix or rectangle, given: ~e" M_0)])])
|
||||
|
||||
|
||||
(define/public (get-M) (if M M R))
|
||||
|
||||
;; create a matrix from this instance
|
||||
|
|
|
@ -24,20 +24,20 @@ instead of this scaling code, we use the dc<%>'s scaling code.
|
|||
(provide/contract [scale-bitmap
|
||||
(-> bytes? natural-number/c natural-number/c (and/c real? (not/c negative?))
|
||||
bytes?)])
|
||||
|
||||
|
||||
|
||||
|
||||
; bmbytes: a bytes which represents an image --
|
||||
; its size is a multiple of 4, and each
|
||||
; four consecutive bytes represent alpha,r,g,b.
|
||||
|
||||
|
||||
|
||||
; scale: given a bmbytes,
|
||||
; return a new bmbytes scaled by k in each direction.
|
||||
;
|
||||
; TODO: this code is meant for scaling by (>= k 1);
|
||||
; if (< k 1) then the result will ignore ~ (1-k) of the original's pixels.
|
||||
; We should really do a proper averaging for that case.
|
||||
;
|
||||
;
|
||||
(define (scale-bitmap bmbytes w h k)
|
||||
(let* {[new-w (round/e (* w k))]
|
||||
[new-h (round/e (* h k))]
|
||||
|
|
|
@ -161,7 +161,7 @@ needed to really make this work:
|
|||
(send output-text last-position))
|
||||
(hash-ref range-ht stx-object (λ () null))))))))
|
||||
(pop!))])
|
||||
|
||||
|
||||
;; reset `path' and `next-push' for use in pp hooks.
|
||||
(set! path '())
|
||||
(set! next-push 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user