diff --git a/community/lms/doctype/lms_sketch/livecode.py b/community/lms/doctype/lms_sketch/livecode.py index 1eb804ad..4363efc7 100644 --- a/community/lms/doctype/lms_sketch/livecode.py +++ b/community/lms/doctype/lms_sketch/livecode.py @@ -41,4 +41,8 @@ def draw_image(commands): for c in commands: if c['function'] == 'circle': img.append(draw.Circle(cx=c['x'], cy=c['y'], r=c['d']/2)) + elif c['function'] == 'line': + img.append(draw.Line(x1=c['x1'], y1=c['y1'], x2=c['x2'], y2=c['y2'])) + elif c['function'] == 'rect': + img.append(draw.Rectangle(x=c['x'], y=c['y'], width=c['w'], height=c['h'])) return img