Skip to content

Commit fe5bb22

Browse files
lpradermkellner
authored andcommitted
poco.md formatting fix
1 parent 709b34b commit fe5bb22

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

documentation/commodetto/poco.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ To keep the following examples concise and focused, the code makes several assum
1414

1515
- They assume that the following color variables are defined:
1616

17-
```javascript
18-
let white = poco.makeColor(255, 255, 255);
19-
let black = poco.makeColor(0, 0, 0);
20-
let gray = poco.makeColor(128, 128, 128);
21-
let red = poco.makeColor(255, 0, 0);
22-
let green = poco.makeColor(0, 255, 0);
23-
let blue = poco.makeColor(0, 0, 255);
24-
```
17+
```javascript
18+
let white = poco.makeColor(255, 255, 255);
19+
let black = poco.makeColor(0, 0, 0);
20+
let gray = poco.makeColor(128, 128, 128);
21+
let red = poco.makeColor(255, 0, 0);
22+
let green = poco.makeColor(0, 255, 0);
23+
let blue = poco.makeColor(0, 0, 255);
24+
```
2525

2626
- They assume that the drawing commands occur between calls to `begin` and `end`.
2727

28-
```javascript
29-
let poco = new Poco(screen);
30-
poco.begin();
31-
... // example code here
32-
poco.end();
33-
```
28+
```javascript
29+
let poco = new Poco(screen);
30+
poco.begin();
31+
... // example code here
32+
poco.end();
33+
```
3434

3535
Each example includes the image rendered by the code. The images are scaled 150% here to make them easier to see; this scaling causes some blurring and introduces some jaggedness that is not in the actual image.
3636

@@ -41,8 +41,7 @@ This example fills `screen` with gray pixels, covers the left half with red pixe
4141
```javascript
4242
poco.fillRectangle(gray, 0, 0, poco.width, poco.height);
4343
poco.fillRectangle(red, 0, 0, poco.width / 2, poco.height);
44-
poco.blendRectangle(blue, 128, poco.width / 4,
45-
0, poco.width / 2, poco.height);
44+
poco.blendRectangle(blue, 128, poco.width / 4, 0, poco.width / 2, poco.height);
4645
```
4746

4847
<img src="../assets/poco/fillrectangle.png" width="180" height="135"/>
@@ -107,10 +106,10 @@ This example draws a monochrome bitmap (in which all pixels are either black or
107106
poco.fillRectangle(gray, 0, 0, poco.width, poco.height);
108107

109108
let envelope = parseBMP(new Resource("envelope.bmp"));
110-
poco.drawMonochrome(envelope, black, white, 14, 10)
111-
poco.drawMonochrome(envelope, red, white, 14, 55)
112-
poco.drawMonochrome(envelope, green, undefined, 74, 10)
113-
poco.drawMonochrome(envelope, undefined, blue, 74, 55)
109+
poco.drawMonochrome(envelope, black, white, 14, 10);
110+
poco.drawMonochrome(envelope, red, white, 14, 55);
111+
poco.drawMonochrome(envelope, green, undefined, 74, 10);
112+
poco.drawMonochrome(envelope, undefined, blue, 74, 55);
114113
```
115114

116115
<img src="../assets/poco/monochrome.png" width="180" height="135"/>
@@ -306,6 +305,7 @@ poco.drawText("Centered", palatino12, black,
306305
(poco.width - poco.getTextWidth("Centered", palatino12)) / 2,
307306
(poco.height - palatino12.height) / 2);
308307
```
308+
309309
<img src="../assets/poco/text3.png" width="180" height="135"/>
310310

311311
The `drawText` function also accepts a 16-gray-level alpha bitmap in the `color` argument. This bitmap is used to draw fonts that consist of multiple colors. The following example shows drawing Open Sans Bold Italic with both black and white pixels in the glyph images.

0 commit comments

Comments
 (0)