You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/commodetto/poco.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,23 +14,23 @@ To keep the following examples concise and focused, the code makes several assum
14
14
15
15
- They assume that the following color variables are defined:
16
16
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
+
```
25
25
26
26
- They assume that the drawing commands occur between calls to `begin` and `end`.
27
27
28
-
```javascript
29
-
let poco =newPoco(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
+
```
34
34
35
35
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.
36
36
@@ -41,8 +41,7 @@ This example fills `screen` with gray pixels, covers the left half with red pixe
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