Sfoglia il codice sorgente

fixed drawRect with lines (see #776)

Nicolas Cannasse 5 anni fa
parent
commit
d66943df76
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      h2d/Graphics.hx

+ 7 - 0
h2d/Graphics.hx

@@ -464,6 +464,13 @@ class Graphics extends Drawable {
 		lineTo(x + w, y + h);
 		lineTo(x, y + h);
 		lineTo(x, y);
+		var e = 0.01; // see #776
+		tmpPoints[0].x += e;
+		tmpPoints[0].y += e;
+		tmpPoints[1].y += e;
+		tmpPoints[3].x += e;
+		tmpPoints[4].x += e;
+		tmpPoints[4].y += e;
 		flush();
 	}