pxt-calliope/docs/reference/images/create-big-image.md
Juri Wolf a93febb5b7
Map and clean deprecated functions (#175)
* add image and deprecated arrow functions

* update locales

* map basic.showArrow

* map arrow blocks

* map & remove arrow images

* remove arrow blocks

* update locales

* remove & patch:
rgbw -> rgb
button/pin pressed -> button/pin event
loudness -> soundLevel

* update ts mappings for arrows

* add wip ts patch rules

* update .blocks files

* use Click instead of Down as default in Documentation and tests

* patch test.blocks

* fix lowercase name tag

* update test.blocks

* update blocks test files

* update blocks test files

* format block files

* pass blocks file tests

* fix ts mapping

* fix color.defl value

closes https://github.com/microsoft/pxt-calliope/issues/136

* fix ts mappings

- add optional spacing at the end of rgbw()
- map up to v4.0.19

* add suggested changes

* replace innerText by textContent

Co-authored-by: JW <gitkraken@juriwolf.de>
Co-authored-by: Juri <info@juriwolf.de>
2022-04-26 10:28:42 -07:00

53 lines
1.5 KiB
Markdown

# Create Big Image
Make a big [image](/reference/images/image) (picture) for the @boardname@
[LED screen](/device/screen). The big image made of two squares.
Each of the squares is five LEDs on a side, like a regular image.
```sig
images.createBigImage(`
. . # . . . . # . .
. # # # . . . # . .
# . # . # # . # . #
. . # . . . # # # .
. . # . . . . # . .
`);
```
## Parameters
* ``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
This program makes a big image with a picture of an arrow pointing up,
and an arrow pointing down. If you press button `A`, the program will
show the arrow pointing up, which starts `0` LEDs from the left in the
big image. If you press button `B`, the program will show the arrow
pointing down, which starts `5` LEDs from the left.
```blocks
let arrows = images.createBigImage(`
. . # . . . . # . .
. # # # . . . # . .
# . # . # # . # . #
. . # . . . # # # .
. . # . . . . # . .
`);
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
arrows.showImage(0);
});
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
arrows.showImage(5);
});
```
## See also
[image](/reference/images/image),
[create image](/reference/images/create-image),
[show image](/reference/images/show-image),
[scroll image](/reference/images/scroll-image), [show animation](/reference/basic/show-animation)