/reference/types -> /types

This commit is contained in:
Peli de Halleux
2017-03-16 07:57:41 -07:00
parent 69bd0225ad
commit 00e9217e73
116 changed files with 224 additions and 361 deletions

View File

@ -16,7 +16,7 @@ images.createBigImage(`
### Parameters
* ``leds`` is a [string](/reference/types/string) that says which LEDs
* ``leds`` is a [string](/types/string) that says which LEDs
on the screen should be on and which should be off.

View File

@ -15,7 +15,7 @@ images.createImage(`
### Parameters
* ``leds`` is a [string](/reference/types/string) that says which LEDs
* ``leds`` is a [string](/types/string) that says which LEDs
on the screen should be on and which should be off.
### Example: Flip-flopping arrow

View File

@ -12,8 +12,8 @@ export function pixel(_this: micro_bit.Image, x: number, y: number) : boolean
### Parameters
* x - [Number](/reference/types/number); the *x coordinate* or horizontal position of a pixel in an [image](/reference/images/image)
* y - [Number](/reference/types/number); the *y coordinate* or vertical position of a pixel in an [image](/reference/images/image)
* x - [Number](/types/number); the *x coordinate* or horizontal position of a pixel in an [image](/reference/images/image)
* y - [Number](/types/number); the *y coordinate* or vertical position of a pixel in an [image](/reference/images/image)
### x, y coordinates?

View File

@ -12,7 +12,7 @@ export function plotFrame(_this: micro_bit.Image, index: number)
### Parameters
* index - [Number](/reference/types/number); which frame of the image to display
* index - [Number](/types/number); which frame of the image to display
### Difference from `plot image`

View File

@ -12,7 +12,7 @@ export function plotImage(_this: micro_bit.Image, xOffset: number)
### Parameters
* x offset - [Number](/reference/types/number); the horizontal starting point of an image; use 0 for the first frame of the image, 5 for the second frame of the image, 10 for the third frame and so on.
* x offset - [Number](/types/number); the horizontal starting point of an image; use 0 for the first frame of the image, 5 for the second frame of the image, 10 for the third frame and so on.
### Difference from `show image`

View File

@ -10,7 +10,7 @@ item.scrollImage(5, 200);
### Parameters
* a [number](/reference/types/number) that means
* a [number](/types/number) that means
how many LEDs to scroll at a time, from right to left or
left to right. If you use a positive number like `2`, the image
will scroll from the right side of the screen to the left.
@ -20,7 +20,7 @@ item.scrollImage(5, 200);
image. It is a square with five LEDs on a side). This is
useful for **animation**.
* a [number](/reference/types/number) that means
* a [number](/types/number) that means
how many milliseconds to wait before scrolling the amount that
``offset`` says. (1000 milliseconds is one second.) The bigger you
make this number, the slower the image will scroll.

View File

@ -12,8 +12,8 @@ export function setPixel(_this: micro_bit.Image, x: number, y: number, value: bo
### Parameters
* x - [Number](/reference/types/number); the *x coordinate* or horizontal position of a pixel in an [image](/reference/images/image)
* x - [Number](/reference/types/number); the *y coordinate* or vertical position of a pixel in an [image](/reference/images/image)
* x - [Number](/types/number); the *x coordinate* or horizontal position of a pixel in an [image](/reference/images/image)
* x - [Number](/types/number); the *y coordinate* or vertical position of a pixel in an [image](/reference/images/image)
* value -[Boolean](/blocks/logic/boolean); the on/off state of a pixel; `true` for on, `false` for off
### x, y coordinates?

View File

@ -12,7 +12,7 @@ export function showFrame(img: micro_bit.Image, frame: number)
### Parameters
* index - [Number](/reference/types/number); which frame of the image to display
* index - [Number](/types/number); which frame of the image to display
### Difference from `plot frame`

View File

@ -12,7 +12,7 @@ item.showImage(0);
### Parameters
* an [image](/reference/images/image) (picture). It is usually a square with five LEDs on a side, but it might be wider.
* a [number](/reference/types/number) that says how many LEDs from the left of the picture the @boardname@ should start. `0` means start at the first **frame** of the picture, `5` means start at the second frame, `10` means start at the third, and so on.
* a [number](/types/number) that says how many LEDs from the left of the picture the @boardname@ should start. `0` means start at the first **frame** of the picture, `5` means start at the second frame, `10` means start at the third, and so on.
### Example: Flip-flopping arrow

View File

@ -14,7 +14,7 @@ images.createImage().width();
### Returns
* [Number](/reference/types/number) - the number of columns in a image. This function returns 5 if the image has 1 frame, 10 for 2 frames, 15 for 3 frames and so on. Divide the number of columns by 5 to find out how many frames an image has (see example below).
* [Number](/types/number) - the number of columns in a image. This function returns 5 if the image has 1 frame, 10 for 2 frames, 15 for 3 frames and so on. Divide the number of columns by 5 to find out how many frames an image has (see example below).
The following example gets the width of `img` and stores it in the `w` variable: