ds_grid_multiply_region


描述

With this function you can specify a region of the grid in which to multiply each cell value by a given amount.

NOTE: This function will only work with real numbers, not strings.


语法:

ds_grid_multiply_region(index, x1, y1, x2, y2, val);

参数 描述
index 栅格的索引
x1 栅格内区域左端x位置。
y1 栅格内区域顶端的y位置。
x2 栅格内区域右端x位置。
y2 栅格内区域底端的y位置。
val The value to multiply with the region cells.


Returns:

N/A(无返回值)


例如:

ds_grid_multiply_region( mygrid, 5, 5, 10, 10, 2 )

The above code will take all the values found within the defined rectangular grid area and multiply each one by 2.