en:getslice [BASIC 256 - Language Documentation]

# BASIC 256 - Language Documentation

en:getslice

## GetSlice (Function)

### Format

getslice(x_expr, y_expr, width_expr, height_expr)

returns string_value

### Description

Return a string that contains a Hexadecimal (base 16) representation of the rectangle defined by the parameters. String is formatted as first 4 bytes - width, next 4 bytes - height, 6 bytes for each pixel (width * height).

### Example

    color 16-1
    plot 1,1
    color 16^2-1
    plot 1,2
    color 16^3-1
    plot 2,1
    color 16^4-1
    plot 2,2
    print getslice(1, 1, 2, 2)

displays

    0002000200000f000fff0000ff00ffff

### See Also

GetSlice, PutSlice

### New To Version

0.9.6b

en/getslice.txt · Last modified: 2014/02/09 20:32 by admin