The easiest way to draw a rubber band style line on a racket canvas

Does anyone have pointers on how to draw (in Racket) in rubber band mode. I would prefer not to use any backbuffers and flip operations. On the same day, the XOR raster operation was used. You draw your line (or another shape) once in XOR mode and to delete it, you draw it again (in XOR mode). This was useful when you wanted users to draw lines, circles, etc. And they were determined by stretching or "rubber tape". Racket docs seem to indicate that the "xor" style is not supported by the% pen or the% brush

Thanks.

+4
source share

Source: https://habr.com/ru/post/1381056/


All Articles