More snippet types

This commit is contained in:
Thomas Denney
2016-08-09 16:55:43 +01:00
parent 9ebd9d4f04
commit 1164feb754
5 changed files with 8 additions and 8 deletions

View File

@ -6,7 +6,7 @@ Display an [Image](/reference/images/image) on the BBC micro:bit's [LED screen](
### JavaScript
```
```sig
export function plotFrame(_this: micro_bit.Image, index: number)
```
@ -20,7 +20,7 @@ The `plot frame` function takes the index of the frame (if there are two frames,
### Example
```
```blocks
let img = images.createImage(`
# . . . # # . . . #
. # . # . . # # # .

View File

@ -6,7 +6,7 @@ Display an [Image](/reference/images/image) on the BBC micro:bit's [LED screen](
### JavaScript
```
```sig
export function plotImage(_this: micro_bit.Image, xOffset: number)
```
@ -20,7 +20,7 @@ The `show image` function has a built in delay of 400ms after display of the ima
### Example
```
```blocks
let img = images.createImage(`
# . . . # # . . . #
. # . # . . # # # .

View File

@ -6,7 +6,7 @@ Set the on/off state of pixel in an [Image](/reference/images/image).
### JavaScript
```
```sig
export function setPixel(_this: micro_bit.Image, x: number, y: number, value: boolean)
```
@ -24,7 +24,7 @@ To figure out the ``x``, ``y`` coordinates, see [LED screen](/device/screen).
The following example creates an image and stores it in the `img` variable. The `set pixel` function sets the centre pixel off, before `img` is shown using `show image`.
```
```blocks
let img = images.createImage(`
. . # . .
. # . # .