Skip to content

Commit f175a04

Browse files
committed
update documentation with fast_visualise and text
1 parent f6a3a8b commit f175a04

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

docs/source/intermediate/fills/eg_fill_hollow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626

2727
t.end_fill()
2828

29-
t.visualise()
29+
t.fast_visualise() # fast_visualise because fills can take a long time

docs/source/intermediate/fills/eg_fill_simplest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# You must call the end_fill() function, or the shape will not be filled!
1515
t.end_fill()
1616

17-
t.visualise(scale=2)
17+
t.fast_visualise(scale=2) # fast_visualise because fills can take a long time

docs/source/intermediate/fills/eg_scanline_fill.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727

2828
t.end_fill()
2929

30-
t.visualise()
30+
t.fast_visualise() # fast_visualise because fills can take a long time

docs/source/intermediate/text.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ we set ``outline=True``.
119119
Outlining text is recommended for relatively small text sizes (less than 150), and preferred over fill as the fill can
120120
get messy with small text sizes.
121121

122+
We can also choose to use satin stitch for a cleaner outline of the text by setting the ``outline_satin_thickness``
123+
paramter, however this will make the code take much longer to run.
124+
122125
We can also choose whether or not to fill text. We can either choose no fill, partial fill, or full fill. The below
123126
code illustrates the three possibilities.
124127

@@ -152,7 +155,7 @@ Here is an example of the text functionality in TurtleThread.
152155

153156
.. literalinclude:: text/eg_text_walkthrough.py
154157
:language: python
155-
:lines: 1-15
158+
:lines: 1-25
156159
:linenos:
157160

158161
.. image:: ../../_static/figures/text/example.png
@@ -168,3 +171,5 @@ Unpacking the above code:
168171
- **Line 10:** ``ld.draw_letter_gap(fontsize)`` is used to draw the gap between two letters, and should be used with ``draw_one_letter``.
169172

170173
- **Line 11:** ``ld.draw_string`` is similar to ``ld.draw_one_letter`` except it draws an entire string instead. Also, instead of parameters named ``fill`` and ``outline``, it has the parameters ``fills`` and ``outlines``, which can be a single boolean value or a list of boolean values.
174+
175+
- **Line 25:** ``te.fast_visualise()`` function will visualise the drawing faster, as text fill may take a long time.

docs/source/intermediate/text/eg_text_walkthrough.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
ld.draw_string("Arial", "PLE", 120, fills=True, outlines=True, full_fill=False) # Prtial fill - best used with outline
2323

2424
# From here on, this unindented code cannot use LetterDrawer.
25-
turtle.visualise()
25+
turtle.fast_visualise() # use fast visualization as fills can take a long time

docs/source/intermediate/whatsnew.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Exporting for Embroidery
5757
The key purpose of TurtleThread is to allow for designs to be embroidered into reality. As such, knowing how to prepare
5858
files for embroidery is essential.
5959

60-
Firstly, ensure that you call the ``turtle.visualise()`` function. From the bottom of the interface, the estimated time
60+
Firstly, ensure that you call the ``turtle.visualise()`` or ``turtle.fast_visualise()`` function. From the bottom of the interface, the estimated time
6161
for how long the pattern will take to embroider is displayed, as well as the number of stitches if you wish to
6262
calculate the time needed for your embroidery machine.
6363

0 commit comments

Comments
 (0)