Reference for draw_line
Draw a simple line. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Line
draw_line
Mouse / Touchscreen
Pixel
Rectangle
Renderers
Shape
Sound (future)
Style
System
Text
Transform
Purpose
Draw a line between two points.
Snippet
Draw a line starting at x coordinate of 50 and y coordinate of 100 going to x coordinate of 150 and y coordinate of 200.
sketch.draw_line(50, 100, 150, 200)
Parameters
- x1: The x coordinate from which the line should be drawn.
- y1: The y coordinate from which the line should be drawn.
- x2: The x coordinate to which the line should be drawn.
- y2: The y coordinate to which the line should be drawn.
Examples
Availability
Available for all platforms.