Name |
copy()复制像素 |
||||||||||||||||||
Examples |
PImage img = loadImage(“eames.jpg”); image(img, 0, 0, width, height); copy(7, 22, 10, 10, 35, 25, 50, 50); stroke(255); noFill(); // Rectangle shows area being copied rect(7, 22, 10, 10); |
||||||||||||||||||
Description |
Copies a region of pixels from the display window to another area of the display window and copies a region of pixels from an image used as the srcImg parameter into the display window. If the source and destination regions aren’t the same size, it will automatically resize the source pixels to fit the specified target region. No alpha information is used in the process, however if the source image has an alpha channel set, it will be copied as well. As of release 0149, this function ignores imageMode(). 将显示窗口中的像素区域复制到显示窗口的另一个区域, 并将图像中用作 srcImg 参数的像素区域复制到显示窗口中。如果源和目标区域的大小不相同, 它将自动调整源像素大小以适应指定的目标区域。进程中不使用 alpha 信息, 但是如果源图像具有 alpha 通道集, 则也会复制它。
在0149版中, 此函数忽略 imageMode ()。 |
||||||||||||||||||
Syntax |
copy() copy(sx, sy, sw, sh, dx, dy, dw, dh) copy(src, sx, sy, sw, sh, dx, dy, dw, dh) |
||||||||||||||||||
Parameters |
|
||||||||||||||||||
Returns |
void or PImage |
||||||||||||||||||
Related |
alpha() |
- 本文固定链接: http://iprocessing.cn/2017/08/09/copy复制像素/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表