Skip to content

Commit 9ec322b

Browse files
committed
Minor spelling fixes in INTRODUCTION.md
1 parent 2955650 commit 9ec322b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

INTRODUCTION.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ Text is drawn using the `drawText(double x, double y, String text)` method.
235235
To customize the appearance of your text, use the `TextFormat` object.
236236
You can access the `TextFormat` object through the `CodeDraw` class by calling the `.getTextFormat()` method.
237237

238-
Inside the `TextFormat` object, there are several of text formatting options, such as:
238+
Inside the `TextFormat` object, there are several text formatting options, such as:
239239
* text size `setFontSize(int)`
240240
* font family `setFontName(String, String...)`
241241
* boldness `setBold(boolean)`
@@ -303,8 +303,9 @@ public class Main {
303303
Certain font name might not be available on a computer.
304304
Therefore, you can set multiple font names using the `setFontName(fontName, ...fallbackFontNames)` method.
305305
The first font name that is available in that list will be used to draw the text.
306-
If none of the specified font names are available on the system, a neutral fallback font will be used through the
307-
[logical font Dialog](https://docs.oracle.com/javase/8/docs/api/java/awt/Font.html).
306+
If none of the specified font names are available on the system, the neutral fallback font
307+
[Dialog](https://docs.oracle.com/javase/8/docs/api/java/awt/Font.html).
308+
will be used.
308309

309310
```java
310311
String[] installedFonts = TextFormat.getAllAvailableFontNames();
@@ -396,14 +397,15 @@ Fortunately, there is an option in Intellij to change this behavior:
396397

397398
![06 Debugging CodeDraw and InstantDraw.png](illustrations%2Fintroduction%2F06%20Debugging%20CodeDraw%20and%20InstantDraw.png)
398399

399-
Once this is set, everything should be as before, but now you can freely move and interact with the CodeDraw window.
400+
Once this is set, everything should be as before, but now you can freely move and interact with the CodeDraw window while debugging.
400401

401402
#### InstantDraw
402403

403404
To better understand what is happening inside your application, CodeDraw has a build in **InstantDraw** mode.
404405
The instant draw mode instantly draws each shape when the corresponding command is called and also guarantees that
405406
once the `draw` or `fill` method returns, the shape is shown on the canvas.
406407
However, the instant draw mode is very slow and should therefore only be used for debugging your application.
408+
Activate the instant draw mode by calling `cd.setInstantDraw(true);`.
407409

408410
#### AlwaysOnTop
409411

@@ -468,7 +470,7 @@ rescales the image to fit inside the 200x200 bounds specified through the width
468470
additionally specifies an interpolation method for rescaling the image.
469471
If not specified, `Interpolation.Bicubic` is chosen by default.
470472

471-
Further details about Interpolation can be found in the CodeDraw
473+
Further details about interpolation can be found in the CodeDraw
472474
[Interpolation enum](https://github.com/Krassnig/CodeDraw/blob/master/src/main/java/codedraw/Interpolation.java)
473475
or on the Wikipedia article on
474476
[Bicubic Interpolation](https://en.wikipedia.org/wiki/Bicubic_interpolation) and
@@ -519,7 +521,7 @@ Image mirrored = Image.mirrorVertically(rotated);
519521
![30 Image Editing.png](illustrations%2Fintroduction%2F30%20Image%20Editing.png)
520522
The operations performed by the code above.
521523

522-
Image editing function:
524+
Image editing functions:
523525
- `Image.crop(Image source, int x, int y, int width, int height)`
524526
- `Image.scale(Image source, double scale)`
525527
- `Image.scale(Image source, double scale, Interpolation interpolation)`
@@ -647,7 +649,7 @@ The java `Scanner` and the `EventScanner` are both queues where the elements are
647649
and the program using the queue takes the elements out from the front of the queue.
648650

649651
Like in the previous section, we need a loop to take out all the available events.
650-
In each iteration, a new event while be at the head of the queue, and the inner while loop will continue until all available events are consumed.
652+
In each iteration, a new event will be at the head of the queue, and the inner while loop will continue until all available events are consumed.
651653
Within the inner loop, the selected branch of the `if`/`else if`/`else` statement depends on the type of event at the head of the queue.
652654

653655
If the head of the queue is a `MouseMoveEvent`, the `.hasMouseMoveEvent()` method will return true.
@@ -699,7 +701,7 @@ public class Main {
699701
}
700702
```
701703

702-
For a more in depth example using the `EventScanner` look at an implementation of [Conway's Game of Life](/src/examples/java/GameOfLife.java) using CodeDraw.
704+
For a more complex example using the `EventScanner` look at this implementation of [Conway's Game of Life](/src/examples/java/GameOfLife.java) using CodeDraw.
703705

704706
## The Animation Interface
705707

0 commit comments

Comments
 (0)