MCPcopy
hub / github.com/processing/p5.js / copy

Method copy

src/image/p5.Image.js:888–916  ·  view source on GitHub ↗

* @param {Integer} sx * @param {Integer} sy * @param {Integer} sw * @param {Integer} sh * @param {Integer} dx * @param {Integer} dy * @param {Integer} dw * @param {Integer} dh

(...args)

Source from the content-addressed store, hash-verified

886 * @param {Integer} dh
887 */
888 copy(...args) {
889 // NOTE: Duplicate implementation here and pixels.js
890 let srcImage, sx, sy, sw, sh, dx, dy, dw, dh;
891 if (args.length === 9) {
892 srcImage = args[0];
893 sx = args[1];
894 sy = args[2];
895 sw = args[3];
896 sh = args[4];
897 dx = args[5];
898 dy = args[6];
899 dw = args[7];
900 dh = args[8];
901 } else if (args.length === 8) {
902 srcImage = this;
903 sx = args[0];
904 sy = args[1];
905 sw = args[2];
906 sh = args[3];
907 dx = args[4];
908 dy = args[5];
909 dw = args[6];
910 dh = args[7];
911 } else {
912 throw new Error('Signature not supported');
913 }
914
915 this._copyHelper(this, srcImage, sx, sy, sw, sh, dx, dy, dw, dh);
916 }
917
918 _copyHelper(
919 dstImage,

Callers 15

maskMethod · 0.95
blendMethod · 0.95
p5.sound.min.jsFile · 0.45
p5.sound.jsFile · 0.45
drawFunction · 0.45
setupFunction · 0.45
liquid.jsFile · 0.45
p5.MediaElement.jsFile · 0.45
pixels.jsFile · 0.45
p5.Shader.jsFile · 0.45
p5.Camera.jsFile · 0.45
p5.RendererGL.jsFile · 0.45

Calls 1

_copyHelperMethod · 0.95

Tested by

no test coverage detected