Processing (BETA) version 135+ のリファレンスです。 旧バージョン使用者はソフトウェア内のリファレンスを参照してください。
この文書は Processing のAPIリファレンスを日本語に訳したものです。 最新の内容は 英語版 で確認して下さい。


Name

copy()

Examples
example pic
PImage img = loadImage("eames.jpg");
image(img, 0, 0);
copy(15, 25, 10, 10, 35, 25, 50, 50);
noFill();
// Rectangle shows area being copied
rect(15, 25, 10, 10);
Description ディスプレイウィンドウ内のピクセル集合をディスプレイウィンドウ内の他のエリアにコピーします。 ディスプレイウィンドウ内の srcImg パラメタで指定されたイメージからピクセル集合をコピーします。 コピーした領域のサイズと移動先の領域のサイズが異なれば、移動先の領域に合うように、自動的にコピーした領域のサイズをリサイズします。 この過程でalpha情報は使用されません。 しかし、元イメージがalphaチャネルの情報を持っていた場合、一緒にコピーされます。

imageMode() はパラメタへの作用を変更します。 例えば、imageMode(CORNERS) を指定した場合、 width, heightパラメタの値は幅と高さではなく、取り出したい矩形の右下のx, y座標として認識されます。
Syntax
copy(x, y, width, height, dx, dy, dwidth, dheight)
copy(srcImg, x, y, width, height, dx, dy, dwidth, dheight)
Parameters
x int: X coordinate of the source's upper left corner
y int: Y coordinate of the source's upper left corner
width int: source image width
height int: source image height
dx int: X coordinate of the destination's upper left corner
dy int: Y coordinate of the destination's upper left corner
dwidth int: destination image width
dheight int: destination image height
srcImg PImage: image variable referring to the source image
Usage Web & Application
Related imageMode()
blend()
get()
Updated on May 24, 2007 06:11:18pm PDT

Creative Commons License

この文書の原文はクリエイティブ・コモンズ(Creative Commons)Attribution-Noncommercial-Share Alike(表示・非営利・継承) ライセンスで公開されています。 このライセンスは同一の許諾条件の下で原作者のクレジットを表示し、また作品を営利目的で利用しなければ、作品に対して複製、頒布、展示、実演、二次的著作物の作成が行えることを示します。

© 2007 Processing.org