-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update shapes_text.md #103
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -606,3 +606,33 @@ def draw(): | |||||
Results in: | ||||||
|
||||||
![text_size() example](img/text_size.png) | ||||||
|
||||||
|
||||||
To draw a line use: | ||||||
|
||||||
```python | ||||||
draw_line(x1, y1, x2, y2) | ||||||
``` | ||||||
|
||||||
**Parameters** | ||||||
|
||||||
- x1: (int) The x-coordinate from the origin indicating the **starting** location of the line. | ||||||
- y1: (int) The y-coordinate from the origin indicating the **starting** location of the line. | ||||||
- x2: (int) The x-coordinate from the origin indicating the **ending** location of the line. | ||||||
- y2: (int) The y-coordinate from the origin indicating the **ending** location of the line. | ||||||
|
||||||
Example(s): | ||||||
|
||||||
```python | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add line highlight
Suggested change
|
||||||
%%ignite | ||||||
|
||||||
def setup(): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use consistent spacing in the example (i.e. 4 spaces per tab) |
||||||
size(200, 200) | ||||||
|
||||||
def draw(): | ||||||
draw_line(50, 50, 150, 150) | ||||||
``` | ||||||
|
||||||
Results in: | ||||||
|
||||||
[NEEDS PICTURE] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update this to point to the right spot. Also rename your PNG from
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a title