forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimageMode.xml
More file actions
executable file
·61 lines (41 loc) · 1.46 KB
/
Copy pathimageMode.xml
File metadata and controls
executable file
·61 lines (41 loc) · 1.46 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>imageMode()</name>
<category>Image</category>
<subcategory>Loading & Displaying</subcategory>
<usage>Web & Application</usage>
<example>
<image>imageMode_.jpg</image>
<code><![CDATA[
PImage b;
b = loadImage("laDefense_crop.jpg");
imageMode(CORNERS);
image(b, 10, 10, 60, 60);
imageMode(CORNER);
image(b, 35, 35, 50, 50);
]]></code>
</example>
<description><![CDATA[
Modifies the location from which images draw. The default mode is <b>imageMode(CORNER)</b>, which specifies the location to be the upper left corner and uses the fourth and fifth parameters of <b>image()</b> to set the image's width and height. The syntax <b>imageMode(CORNERS)</b> uses the second and third parameters of <b>image()</b> to set the location of one corner of the image and uses the fourth and fifth parameters to set the opposite corner. Use <b>imageMode(CENTER)</b> to draw images centered at the given x and y position.
<br/> <br/>
The parameter to <b>imageMode()</b> must be written in ALL CAPS because Processing is a case sensitive language.
]]></description>
<syntax><![CDATA[
imageMode(MODE)
]]></syntax>
<parameter>
<label>MODE</label>
<description><![CDATA[Either CORNER, CORNERS, or CENTER]]></description>
</parameter>
<returns>None</returns>
<related>
loadImage()
PImage
image()
imageMode()
background()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
</root>