forked from jdf/processing-py-site
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPImage_copy.xml
More file actions
88 lines (68 loc) · 2.16 KB
/
PImage_copy.xml
File metadata and controls
88 lines (68 loc) · 2.16 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
87
88
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>copy()</name>
<category>PImage</category>
<subcategory>Method</subcategory>
<type></type>
<example>
<image />
<code><![CDATA[
size(100, 100)
apples = loadImage("apples.jpg")
x = width/2
apples.copy(x, 0, x, height, 0, 0, x, height)
image(apples, 0, 0)
]]></code>
</example>
<description><![CDATA[
Copies a region of pixels from one image into another. If the source and destination regions aren't the same size, it will automatically resize 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>
pimg.copy(sx, sy, sw, sh, dx, dy, dw, dh)
pimg.copy(src, sx, sy, sw, sh, dx, dy, dw, dh)
</syntax>
<parameter>
<label>pimg</label>
<description><![CDATA[PImage: any object of type PImage]]></description>
</parameter>
<parameter>
<label>sx</label>
<description><![CDATA[int: X coordinate of the source's upper left corner]]></description>
</parameter>
<parameter>
<label>sy</label>
<description><![CDATA[int: Y coordinate of the source's upper left corner]]></description>
</parameter>
<parameter>
<label>sw</label>
<description><![CDATA[int: source image width]]></description>
</parameter>
<parameter>
<label>sh</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>dw</label>
<description><![CDATA[int: destination image width]]></description>
</parameter>
<parameter>
<label>dh</label>
<description><![CDATA[int: destination image height]]></description>
</parameter>
<parameter>
<label>src</label>
<description><![CDATA[PImage: an image variable referring to the source image.]]></description>
</parameter>
<related>alpha</related>
<related>PImage_blend</related>
</root>