Closed elephanter closed 4 years ago
Technically, there's nothing preventing someone from programming this:
(draw 10 10 '(#x11223344))
Without the bitwise-and
, the code would attempt to vector-ref
to index #x11223344
of the bitmask-rect
vector instead of index #x44
, resulting - at the very least - in an index out of bounds error.
Does that help?
Thank you, now I see. And there is no reason to use bitwise-and in draw-ex method because you pick up bit range and there no chance to out of bounds errors
You used (bitwise-and byte #xff) in draw function for bitmask scanline but in draw-ex function just get bit fields from input sprite and use them in bitmask scanlines
is this an error? I don't understand the need of bitwise-and in draw