wasm4 icon indicating copy to clipboard operation
wasm4 copied to clipboard

`rect` with outline wraps to other side of screen

Open JerwuQu opened this issue 3 years ago • 0 comments

An off-screen rect with outline placed such that its width ends one pixel before the screen starts will incorrectly wrap to the other side of the screen.

Without outline it behaves correctly.

#include "wasm4.h"

void update () {
	*DRAW_COLORS = 0x43;

	hline(0, 5, 160);
	hline(0, 25, 160);
	hline(0, 45, 160);
	hline(0, 65, 160);
	hline(0, 85, 160);

	rect(-10, 10, 15, 10);
	rect(-10, 30, 11, 10);
	rect(-10, 50, 10, 10); // Boom!
	rect(-10, 70, 9, 10);
}

wasm4-screenshot (47)

JerwuQu avatar Aug 18 '22 13:08 JerwuQu