def drawLineAngle(cls, cx, cy, r, angle): points = [] radius = 14 y = -radius * math.sin(r) y2 = -radius * math.sin(r - math.pi/2.0) if r <= math.pi*0.25: clr = 5 elif r <= math.pi*0.5: clr = 12 elif r <= math.pi*0.75: clr = 6 else: clr = 5 #pyxel.line(cx -32, cy, cx -8, y, clr) #pyxel.line(cx -8, y, cx +8, y, clr) #pyxel.line(cx +8, y, cx +32, cy, clr) points.append([-32, +0]) points.append([-8, +y]) points.append([+8, +y]) points.append([+32, +0]) xpoints = gcommon.getAnglePoints([cx, cy], points, [0,0], angle) Drawing.drawConnectedLines(xpoints, clr) if r >math.pi*0.75 and r <= math.pi * 1.75: pass else: #pyxel.line(cx -8, y, cx -8, y2, clr) #pyxel.line(cx +8, y, cx +8, y2, clr) points = [[-8, y], [-8, y2], [+8, y], [+8, y2]] xpoints = gcommon.getAnglePoints([cx, cy], points, [0,0], angle) Drawing.drawLines(xpoints, clr)