From aa64ba9149946de10d6f2767913af82f1f3e1e3e Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 12 Jun 2018 16:44:27 +0200 Subject: [PATCH] revert changes to pixels library because they are apparently not needed after all --- libraries/pixel_module.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/pixel_module.xml b/libraries/pixel_module.xml index 60dcb717..5731bb27 100644 --- a/libraries/pixel_module.xml +++ b/libraries/pixel_module.xml @@ -1,4 +1,4 @@ reports a list of all pixels in the given costume. Each pixel is represented by a 4-item sublist of RGBA values
pixelsname pixels width -heightwidthheightcostume var i, pixels = [], src = costume.contents.getContext('2d').getImageData( 0, 0, costume.width(), costume.height() ); for (i = 0; i < src.data.length; i += 4) { pixels.push(new List([ src.data[i], src.data[i + 1], src.data[i + 2], src.data[i + 3] ])); } return new List(pixels);
overwrite the pixels in the given costume with another list of pixels. Caution! This operation directly changes the costume. Make sure to use a copy in case you would like to revert changes later.
reports the sprite's actual current costume, which may or may not be part of its wardrobe e.g. if it is a copy
reports a copy of the given costume. This is especially useful when modifying a costume, so you can keep the original around
display the given bitmap in a copy of the current costume (so you can switch back to the original costume again)
\ No newline at end of file +heightwidthheightcostume var i, pixels = [], src = costume.contents.getContext('2d').getImageData( 0, 0, costume.width(), costume.height() ); for (i = 0; i < src.data.length; i += 4) { pixels.push(new List([ src.data[i], src.data[i + 1], src.data[i + 2], src.data[i + 3] ])); } return new List(pixels);overwrite the pixels in the given costume with another list of pixels. Caution! This operation directly changes the costume. Make sure to use a copy in case you would like to revert changes later.
reports the sprite's actual current costume, which may or may not be part of its wardrobe e.g. if it is a copy
reports a copy of the given costume. This is especially useful when modifying a costume, so you can keep the original around
display the given bitmap in a copy of the current costume (so you can switch back to the original costume again)
\ No newline at end of file