batch fixing ](/microbit/ -> ](/ links

This commit is contained in:
Peli de Halleux
2016-04-13 08:27:45 -07:00
parent 2e49901a7e
commit d28efb3b84
517 changed files with 2235 additions and 2235 deletions

View File

@ -1,6 +1,6 @@
# Create Image
Create an [Image](/microbit/reference/image/image) to show on the [LED screen](/microbit/device/screen).
Create an [Image](/reference/image/image) to show on the [LED screen](/device/screen).
```sig
images.createImage(`
@ -31,9 +31,9 @@ input.onGesture(Gesture.Shake, () => {
### Lessons
[rock paper scissors](/microbit/lessons/rock-paper-scissors), [digital pet](/microbit/lessons/digital-pet), [offset-image](/microbit/lessons/offset-image)
[rock paper scissors](/lessons/rock-paper-scissors), [digital pet](/lessons/digital-pet), [offset-image](/lessons/offset-image)
### See also
[show animation](/microbit/reference/basic/show-animation), [image](/microbit/reference/image/image), [show image](/microbit/reference/image/show-image), [scroll image](/microbit/reference/image/scroll-image)
[show animation](/reference/basic/show-animation), [image](/reference/image/image), [show image](/reference/image/show-image), [scroll image](/reference/image/scroll-image)

View File

@ -4,11 +4,11 @@ An image for the micro:bit screen.
### @parent blocks/language
An *Image* is a matrix of pixels to show on the [LED screen](/microbit/device/screen)
An *Image* is a matrix of pixels to show on the [LED screen](/device/screen)
### Block Editor: Show LEDs
To display an image using the [Block Editor](/microbit/blocks/editor):
To display an image using the [Block Editor](/blocks/editor):
* click `Basic` , `Show LEDs`, and tap on the LEDs`
* when you're done, return to your code
@ -19,11 +19,11 @@ You should see code similar to this:
### Creating an image
To create an image that you can later modify, see the [create image](/microbit/reference/images/create-image) function.
To create an image that you can later modify, see the [create image](/reference/images/create-image) function.
### Block editor: create and show images
To create images using the [Block editor](/microbit/blocks/editor):
To create images using the [Block editor](/blocks/editor):
1. Click the **Images** category on the left.
@ -39,18 +39,18 @@ You should see code similar to this:
### Image functions
* [create image](/microbit/reference/images/create-image): create an image from a series of on/off LED states
* [clear](/microbit/reference/basic/clear-screen): turn off all the pixels in an image
* [pixel](/microbit/reference/images/pixel): get the state of a pixel in an image
* [show-leds](/microbit/reference/basic/show-leds): show a single-frame image on the LED screen
* [show image](/microbit/reference/images/show-image): show an image on the screen
* [scroll image](/microbit/reference/images/scroll-image): scroll an image on the screen
* [create image](/reference/images/create-image): create an image from a series of on/off LED states
* [clear](/reference/basic/clear-screen): turn off all the pixels in an image
* [pixel](/reference/images/pixel): get the state of a pixel in an image
* [show-leds](/reference/basic/show-leds): show a single-frame image on the LED screen
* [show image](/reference/images/show-image): show an image on the screen
* [scroll image](/reference/images/scroll-image): scroll an image on the screen
### Lessons
* [smiley](/microbit/lessons/smiley)
* [smiley](/lessons/smiley)
### See also
[Show LEDs](/microbit/reference/basic/show-leds), [create image](/microbit/reference/images/create-image), [show image](/microbit/reference/images/show-image), [LED screen](/microbit/device/screen)
[Show LEDs](/reference/basic/show-leds), [create image](/reference/images/create-image), [show image](/reference/images/show-image), [LED screen](/device/screen)

View File

@ -2,7 +2,7 @@
The pixel function.
Get the state of a pixel in an [Image](/microbit/reference/image/image).
Get the state of a pixel in an [Image](/reference/image/image).
### KindScript
@ -12,16 +12,16 @@ export function pixel(_this: micro_bit.Image, x: number, y: number) : boolean
### Parameters
* x - [Number](/microbit/reference/types/number); the *x coordinate* or horizontal position of a pixel in an [image](/microbit/reference/image/image)
* y - [Number](/microbit/reference/types/number); the *y coordinate* or vertical position of a pixel in an [image](/microbit/reference/image/image)
* x - [Number](/reference/types/number); the *x coordinate* or horizontal position of a pixel in an [image](/reference/image/image)
* y - [Number](/reference/types/number); the *y coordinate* or vertical position of a pixel in an [image](/reference/image/image)
### x, y coordinates?
To figure out the ``x``, ``y`` coordinates, see [LED screen](/microbit/device/screen).
To figure out the ``x``, ``y`` coordinates, see [LED screen](/device/screen).
### Returns
* [Boolean](/microbit/reference/types/boolean) - `true` for on and `false` for off
* [Boolean](/reference/types/boolean) - `true` for on and `false` for off
### Example
@ -47,5 +47,5 @@ let state = img.pixel(0, 0)
### See also
[set pixel](/microbit/reference/images/set-pixel), [show image](/microbit/reference/images/show-image), [image](/microbit/reference/image/image), [create image](/microbit/reference/images/create-image), [scroll image](/microbit/reference/images/scroll-image)
[set pixel](/reference/images/set-pixel), [show image](/reference/images/show-image), [image](/reference/image/image), [create image](/reference/images/create-image), [scroll image](/reference/images/scroll-image)

View File

@ -2,7 +2,7 @@
The plot frame function.
Display an [Image](/microbit/reference/image/image) on the BBC micro:bit's [LED screen](/microbit/device/screen)
Display an [Image](/reference/image/image) on the BBC micro:bit's [LED screen](/device/screen)
### KindScript
@ -12,7 +12,7 @@ export function plotFrame(_this: micro_bit.Image, index: number)
### Parameters
* index - [Number](/microbit/reference/types/number); which frame of the image to display
* index - [Number](/reference/types/number); which frame of the image to display
### Difference from `plot image`
@ -33,9 +33,9 @@ img.plotFrame(1)
### Lessons
[smiley](/microbit/lessons/smiley), [flashing heart](/microbit/lessons/flashing-heart), [magic logo](/microbit/lessons/magic-logo)
[smiley](/lessons/smiley), [flashing heart](/lessons/flashing-heart), [magic logo](/lessons/magic-logo)
### See also
[create image](/microbit/reference/images/create-image), [show animation](/microbit/reference/basic/show-animation), [image](/microbit/reference/image/image), [show image](/microbit/reference/images/show-image), [scroll image](/microbit/reference/images/scroll-image)
[create image](/reference/images/create-image), [show animation](/reference/basic/show-animation), [image](/reference/image/image), [show image](/reference/images/show-image), [scroll image](/reference/images/scroll-image)

View File

@ -2,7 +2,7 @@
The plot image function.
Display an [Image](/microbit/reference/image/image) on the BBC micro:bit's [LED screen](/microbit/device/screen)
Display an [Image](/reference/image/image) on the BBC micro:bit's [LED screen](/device/screen)
### KindScript
@ -12,7 +12,7 @@ export function plotImage(_this: micro_bit.Image, xOffset: number)
### Parameters
* x offset - [Number](/microbit/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](/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.
### Difference from `show image`
@ -33,9 +33,9 @@ img.plotImage(0)
### Lessons
[smiley](/microbit/lessons/smiley), [flashing heart](/microbit/lessons/flashing-heart), [magic logo](/microbit/lessons/magic-logo)
[smiley](/lessons/smiley), [flashing heart](/lessons/flashing-heart), [magic logo](/lessons/magic-logo)
### See also
[create image](/microbit/reference/images/create-image), [show animation](/microbit/reference/basic/show-animation), [image](/microbit/reference/image/image), [show image](/microbit/reference/images/show-image), [scroll image](/microbit/reference/images/scroll-image)
[create image](/reference/images/create-image), [show animation](/reference/basic/show-animation), [image](/reference/image/image), [show image](/reference/images/show-image), [scroll image](/reference/images/scroll-image)

View File

@ -2,7 +2,7 @@
The scroll image function.
Scrolls the frames within an [Image](/microbit/reference/image/image) on the [LED screen](/microbit/device/screen).
Scrolls the frames within an [Image](/reference/image/image) on the [LED screen](/device/screen).
### Block Editor
@ -16,8 +16,8 @@ export function scrollImage(_this: micro_bit.Image, xOffsetPerStep: number, inte
### Parameters
* x offset per step : [Number](/microbit/reference/types/number) - the number of columns to scroll at a time (horizontal offset). Use a positive number to scroll an image to the right and a negative number to scroll left. To jump from one image frame to the next, use an offset of 5 or -5.
* interval (ms) : [Number](/microbit/reference/types/number) - the time (in milliseconds) before scrolling by `x offset per step`; the larger the number, the slower the scroll.
* x offset per step : [Number](/reference/types/number) - the number of columns to scroll at a time (horizontal offset). Use a positive number to scroll an image to the right and a negative number to scroll left. To jump from one image frame to the next, use an offset of 5 or -5.
* interval (ms) : [Number](/reference/types/number) - the time (in milliseconds) before scrolling by `x offset per step`; the larger the number, the slower the scroll.
### ~hide
@ -69,5 +69,5 @@ img.scrollImage(5, 1000)
### See also
[show image](/microbit/reference/images/show-image), [image](/microbit/reference/image/image), [create image](/microbit/reference/images/create-image), [show animation](/microbit/reference/basic/show-animation)
[show image](/reference/images/show-image), [image](/reference/image/image), [create image](/reference/images/create-image), [show animation](/reference/basic/show-animation)

View File

@ -2,7 +2,7 @@
The set pixel function. #set pixel.
Set the on/off state of pixel in an [Image](/microbit/reference/image/image).
Set the on/off state of pixel in an [Image](/reference/image/image).
### KindScript
@ -12,13 +12,13 @@ export function setPixel(_this: micro_bit.Image, x: number, y: number, value: bo
### Parameters
* x - [Number](/microbit/reference/types/number); the *x coordinate* or horizontal position of a pixel in an [image](/microbit/reference/image/image)
* x - [Number](/microbit/reference/types/number); the *y coordinate* or vertical position of a pixel in an [image](/microbit/reference/image/image)
* value -[Boolean](/microbit/reference/types/boolean); the on/off state of a pixel; `true` for on, `false` for off
* x - [Number](/reference/types/number); the *x coordinate* or horizontal position of a pixel in an [image](/reference/image/image)
* x - [Number](/reference/types/number); the *y coordinate* or vertical position of a pixel in an [image](/reference/image/image)
* value -[Boolean](/reference/types/boolean); the on/off state of a pixel; `true` for on, `false` for off
### x, y coordinates?
To figure out the ``x``, ``y`` coordinates, see [LED screen](/microbit/device/screen).
To figure out the ``x``, ``y`` coordinates, see [LED screen](/device/screen).
### Example
@ -38,5 +38,5 @@ img.showImage(0)
### See also
[pixel](/microbit/reference/images/pixel), [show image](/microbit/reference/images/show-image), [image](/microbit/reference/image/image), [create image](/microbit/reference/images/create-image), [scroll image](/microbit/reference/images/scroll-image)
[pixel](/reference/images/pixel), [show image](/reference/images/show-image), [image](/reference/image/image), [create image](/reference/images/create-image), [scroll image](/reference/images/scroll-image)

View File

@ -2,7 +2,7 @@
The show frame function.
Display an [Image](/microbit/reference/image/image) on the BBC micro:bit's [LED screen](/microbit/device/screen)
Display an [Image](/reference/image/image) on the BBC micro:bit's [LED screen](/device/screen)
### KindScript
@ -12,11 +12,11 @@ export function showFrame(img: micro_bit.Image, frame: number)
### Parameters
* index - [Number](/microbit/reference/types/number); which frame of the image to display
* index - [Number](/reference/types/number); which frame of the image to display
### Difference from `plot frame`
The `show frame` function is the same as [plot frame](/microbit/reference/image/plot-frame), but contains a built-in delay after the LED screen has been updated (whereas `plot frame` has no built-in delay)
The `show frame` function is the same as [plot frame](/reference/image/plot-frame), but contains a built-in delay after the LED screen has been updated (whereas `plot frame` has no built-in delay)
### Example
@ -33,9 +33,9 @@ img.showFrame(1)
### Lessons
[smiley](/microbit/lessons/smiley), [flashing heart](/microbit/lessons/flashing-heart), [magic logo](/microbit/lessons/magic-logo)
[smiley](/lessons/smiley), [flashing heart](/lessons/flashing-heart), [magic logo](/lessons/magic-logo)
### See also
[create image](/microbit/reference/images/create-image), [show animation](/microbit/reference/basic/show-animation), [image](/microbit/reference/image/image), [show image](/microbit/reference/images/show-image), [scroll image](/microbit/reference/images/scroll-image)
[create image](/reference/images/create-image), [show animation](/reference/basic/show-animation), [image](/reference/image/image), [show image](/reference/images/show-image), [scroll image](/reference/images/scroll-image)

View File

@ -2,7 +2,7 @@
The show image function.
Show an [Image](/microbit/reference/image/image) on the [LED screen](/microbit/device/screen), followed by a 400ms pause.
Show an [Image](/reference/image/image) on the [LED screen](/device/screen), followed by a 400ms pause.
### Block Editor
@ -16,11 +16,11 @@ export function showImage(_this: micro_bit.Image, xOffset: number)
### Parameters
* x offset - [Number](/microbit/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](/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.
### Create image and show image
Use the [image editor](/microbit/reference/image/image) to create images using the [create image](/microbit/reference/image/create-image) function, and then use `show image` like this:
Use the [image editor](/reference/image/image) to create images using the [create image](/reference/image/create-image) function, and then use `show image` like this:
```
let img = images.createImage(`
@ -35,7 +35,7 @@ img.showImage(0)
### Example: display numbers 1-5
The following example creates an image with 5 frames and then uses a [for loop](/microbit/reference/loops/for) to show each frame on the screen:
The following example creates an image with 5 frames and then uses a [for loop](/reference/loops/for) to show each frame on the screen:
```
let img2 = images.createImage(`
@ -53,9 +53,9 @@ for (let i = 0; i < 5; i++) {
### Lessons
[rock paper scissors](/microbit/lessons/rock-paper-scissors), [digital pet](/microbit/lessons/digital-pet), [offset-image](/microbit/lessons/offset-image)
[rock paper scissors](/lessons/rock-paper-scissors), [digital pet](/lessons/digital-pet), [offset-image](/lessons/offset-image)
### See also
[show animation](/microbit/reference/basic/show-animation), [image](/microbit/reference/image/image), [create image](/microbit/reference/images/create-image), [scroll image](/microbit/reference/images/scroll-image)
[show animation](/reference/basic/show-animation), [image](/reference/image/image), [create image](/reference/images/create-image), [scroll image](/reference/images/scroll-image)

View File

@ -2,7 +2,7 @@
The width function.
Get the width of an [Image](/microbit/reference/image/image) in columns.
Get the width of an [Image](/reference/image/image) in columns.
### KindScript
@ -16,7 +16,7 @@ export function width(_this: micro_bit.Image) : number
### Returns
* [Number](/microbit/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](/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).
The following example gets the width of `img` and stores it in the `w` variable:
@ -40,7 +40,7 @@ let w = img.width()
### Example: show each frame
The following example uses the `width` function with a [for](/microbit/reference/loops/for) loop to show each image frame on the screen:
The following example uses the `width` function with a [for](/reference/loops/for) loop to show each image frame on the screen:
```
let img2 = images.createImage(`
@ -58,5 +58,5 @@ for (let i = 0; i < img2.width() / 5; i++) {
### See also
[show image](/microbit/reference/images/show-image), [image](/microbit/reference/image/image), [create image](/microbit/reference/images/create-image), [scroll image](/microbit/reference/images/scroll-image), [show animation](/microbit/reference/basic/show-animation)
[show image](/reference/images/show-image), [image](/reference/image/image), [create image](/reference/images/create-image), [scroll image](/reference/images/scroll-image), [show animation](/reference/basic/show-animation)