added a check to avoid creating a new bitmap struct (so caching works better when you flip images that are not scaled)
This commit is contained in:
parent
4311a5e5d6
commit
1d0ebeae62
|
@ -557,14 +557,18 @@ has been moved out).
|
||||||
(text-weight shape)
|
(text-weight shape)
|
||||||
(text-underline shape))]
|
(text-underline shape))]
|
||||||
[(flip? shape)
|
[(flip? shape)
|
||||||
(let ([bitmap (flip-shape shape)])
|
(cond
|
||||||
(make-flip (flip-flipped? shape)
|
[(and (= 1 x-scale) (= 1 y-scale))
|
||||||
(make-bitmap (bitmap-raw-bitmap bitmap)
|
shape]
|
||||||
(bitmap-raw-mask bitmap)
|
[else
|
||||||
(bitmap-angle bitmap)
|
(let ([bitmap (flip-shape shape)])
|
||||||
(* x-scale (bitmap-x-scale bitmap))
|
(make-flip (flip-flipped? shape)
|
||||||
(* y-scale (bitmap-y-scale bitmap))
|
(make-bitmap (bitmap-raw-bitmap bitmap)
|
||||||
#f #f)))]))
|
(bitmap-raw-mask bitmap)
|
||||||
|
(bitmap-angle bitmap)
|
||||||
|
(* x-scale (bitmap-x-scale bitmap))
|
||||||
|
(* y-scale (bitmap-y-scale bitmap))
|
||||||
|
#f #f)))])]))
|
||||||
|
|
||||||
(define (scale-color color x-scale y-scale)
|
(define (scale-color color x-scale y-scale)
|
||||||
(cond
|
(cond
|
||||||
|
|
Loading…
Reference in New Issue
Block a user