diff --git a/arc-core/src/arc/graphics/g2d/Lines.java b/arc-core/src/arc/graphics/g2d/Lines.java index ca09a07e..82278fa3 100644 --- a/arc-core/src/arc/graphics/g2d/Lines.java +++ b/arc-core/src/arc/graphics/g2d/Lines.java @@ -152,6 +152,10 @@ public static void polyline(FloatSeq points, boolean wrap){ //implementation taken from https://github.com/earlygrey/shapedrawer/blob/master/drawer/src/space/earlygrey/shapedrawer/ShapeDrawer.java public static void polyline(float[] points, int length, boolean wrap){ if(length < 4) return; + if(length == 4){ //line is faster and this method doesn't even work correctly with 2 items + line(points[0], points[1], points[2], points[3]); + return; + } float halfWidth = 0.5f * stroke;