Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/shapes_text.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,3 +606,33 @@ def draw():
Results in:

![text_size() example](img/text_size.png)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a title

Suggested change
#### Drawing Lines


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
Copy link
Member

@AlphaRLee AlphaRLee Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add line highlight

Suggested change
```python
```python hl_lines="6"

%%ignite

def setup():
Copy link
Member

Choose a reason for hiding this comment

The 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]
Copy link
Member

Choose a reason for hiding this comment

The 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 draw-line to draw_line for consistency

Suggested change
[NEEDS PICTURE]
![draw_line() example](docs/draw_line.png)