update to pxt 5 and pxt-common-packages 6 (#934)
* bump pxt * fix build issues * Auto-gen of projects/summary * removing feild editors moved to pxt * various typing fixes * more typing fixes * fixing various typing issues * Start on integration of new pxt * serial number fixes * gc-ify MMap object * Re-build generated files * fix console listeners * clear lf() warnings * More generated files * also auto-generated * Compilation fixes * fix merge * mostly fixing blocks * fix sim * fix field motors * enable a few features * moving to tsx * try to fix edtiro compilation * more defs * removing commands * removing extra $ * fix blockly warning * hiding images * enabling more pxt features * hide images * setup autorun * add lock on target_reset * update deps * return trylock result * updated pxt * rename video section * add alpha channel * upgraded pxt * bump pxt/version * removed alpha ref * var ceanup * don't do major bump
This commit is contained in:
committed by
Peli de Halleux
parent
ba94322d4c
commit
c5cec3a6ba
10
libs/screen/screenimage.ts
Normal file
10
libs/screen/screenimage.ts
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
namespace image {
|
||||
/**
|
||||
* Get the screen image
|
||||
*/
|
||||
//%
|
||||
export function screenImage(): Image {
|
||||
return screen;
|
||||
}
|
||||
}
|
14
libs/screen/shims.d.ts
vendored
14
libs/screen/shims.d.ts
vendored
@ -15,7 +15,7 @@ declare interface Image {
|
||||
height: int32;
|
||||
|
||||
/**
|
||||
* True iff the image is monochromatic (black and white)
|
||||
* True if the image is monochromatic (black and white)
|
||||
*/
|
||||
//% property shim=ImageMethods::isMono
|
||||
isMono: boolean;
|
||||
@ -45,6 +45,18 @@ declare interface Image {
|
||||
//% shim=ImageMethods::fill
|
||||
fill(c: int32): void;
|
||||
|
||||
/**
|
||||
* Copy row(s) of pixel from image to buffer (8 bit per pixel).
|
||||
*/
|
||||
//% shim=ImageMethods::getRows
|
||||
getRows(x: int32, dst: Buffer): void;
|
||||
|
||||
/**
|
||||
* Copy row(s) of pixel from buffer to image.
|
||||
*/
|
||||
//% shim=ImageMethods::setRows
|
||||
setRows(x: int32, src: Buffer): void;
|
||||
|
||||
/**
|
||||
* Return a copy of the current image
|
||||
*/
|
||||
|
Reference in New Issue
Block a user