This shows you the differences between two versions of the page.
en:getslice [2016/09/08 12:08] admin |
en:getslice [2020/02/28 10:46] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== GetSlice (Function) ===== | ||
- | ==== Format ==== | ||
- | getslice([[numericexpressions|x_position]], | ||
- | |||
- | returns [[arrays|array]] | ||
- | |||
- | ==== Description ==== | ||
- | Return a 2 dimensional array of the pixels in the rectangle defined by the parameters. | ||
- | |||
- | ==== Example ==== | ||
- | < | ||
- | clg | ||
- | color red | ||
- | plot 1,1 | ||
- | color green | ||
- | plot 1,2 | ||
- | color blue | ||
- | plot 2,1 | ||
- | color yellow | ||
- | plot 2,2 | ||
- | |||
- | vals = getslice(1, 1, 2, 3) | ||
- | |||
- | for rows = 0 to 2 | ||
- | for cols = 0 to 1 | ||
- | print " | ||
- | next cols | ||
- | next rows | ||
- | |||
- | </ | ||
- | displays | ||
- | < | ||
- | (0, | ||
- | (0, | ||
- | (1, | ||
- | (1,1)=-256 | ||
- | (2,0)=0 | ||
- | (2,1)=0 | ||
- | </ | ||
- | |||
- | ==== See Also ==== | ||
- | {{page> | ||
- | |||
- | ==== New To Version ==== | ||
- | 0.9.6b | ||
- | |||
- | ==== History ==== | ||
- | |0.9.6b|New To Version| | ||
- | |1.99.99.65|Changed return value to a 2 dimensional array of pixel values| | ||