forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopy.xml
More file actions
executable file
·86 lines (71 loc) · 2.55 KB
/
Copy pathcopy.xml
File metadata and controls
executable file
·86 lines (71 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>copy()</name>
<category>Image</category>
<subcategory>Pixels</subcategory>
<usage>Web & Application</usage>
<example>
<image>copy_.jpg</image>
<code><![CDATA[
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);
]]></code>
</example>
<description><![CDATA[
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 <b>srcImg</b> 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.
<br /><br />
As of release 0149, this function ignores <b>imageMode()</b>.
]]></description>
<syntax><![CDATA[
copy(<kbd>x</kbd>, <kbd>y</kbd>, <kbd>width</kbd>, <kbd>height</kbd>, <kbd>dx</kbd>, <kbd>dy</kbd>, <kbd>dwidth</kbd>, <kbd>dheight</kbd>)
copy(<kbd>srcImg</kbd>, <kbd>x</kbd>, <kbd>y</kbd>, <kbd>width</kbd>, <kbd>height</kbd>, <kbd>dx</kbd>, <kbd>dy</kbd>, <kbd>dwidth</kbd>, <kbd>dheight</kbd>)
]]></syntax>
<parameter>
<label>x</label>
<description><![CDATA[int: X coordinate of the source's upper left corner]]></description>
</parameter>
<parameter>
<label>y</label>
<description><![CDATA[int: Y coordinate of the source's upper left corner]]></description>
</parameter>
<parameter>
<label>width</label>
<description><![CDATA[int: source image width]]></description>
</parameter>
<parameter>
<label>height</label>
<description><![CDATA[int: source image height]]></description>
</parameter>
<parameter>
<label>dx</label>
<description><![CDATA[int: X coordinate of the destination's upper left corner]]></description>
</parameter>
<parameter>
<label>dy</label>
<description><![CDATA[int: Y coordinate of the destination's upper left corner]]></description>
</parameter>
<parameter>
<label>dwidth</label>
<description><![CDATA[int: destination image width]]></description>
</parameter>
<parameter>
<label>dheight</label>
<description><![CDATA[int: destination image height]]></description>
</parameter>
<parameter>
<label>srcImg</label>
<description><![CDATA[PImage: image variable referring to the source image]]></description>
</parameter>
<returns>None</returns>
<related>
blend()
get()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
</root>