forked from processing/processing-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot.xml
More file actions
executable file
·90 lines (65 loc) · 1.85 KB
/
dot.xml
File metadata and controls
executable file
·90 lines (65 loc) · 1.85 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
89
90
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>. (dot)</name>
<category>Structure</category>
<subcategory></subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
// Declare and construct two objects (h1 and h2) of the class HLine
HLine h1 = new HLine(20, 1.0);
HLine h2 = new HLine(50, 5.0);
void setup() {
size(200, 200);
}
void draw() {
if (h2.speed > 1.0) { // Dot syntax can be used to get a value
h2.speed -= 0.01; // or set a value.
}
h1.update(); // Calls the h1 object's update() function
h2.update(); // Calls the h2 object's update() function
}
class HLine { // Class definition
float ypos, speed; // Data
HLine (float y, float s) { // Object constructor
ypos = y;
speed = s;
}
void update() { // Update method
ypos += speed;
if (ypos > width) {
ypos = 0;
}
line(0, ypos, width, ypos);
}
}
]]></code>
</example>
<description><![CDATA[
Provides access to an object's methods and data. An object is one instance of a class and may contain both methods (object functions) and data (object variables and constants), as specified in the class definition. The dot operator directs the program to the information encapsulated within an object.
]]></description>
<syntax>
<c>object</c>.<c>method()</c>
<c>object</c>.<c>data</c>
</syntax>
<parameter>
<label>object</label>
<description><![CDATA[the object to be accessed]]></description>
</parameter>
<parameter>
<label>method()</label>
<description><![CDATA[a method encapsulated in the object]]></description>
</parameter>
<parameter>
<label>data</label>
<description><![CDATA[a variable or constant encapsulated in the object]]></description>
</parameter>
<returns></returns>
<related>
Object
</related>
<availability>1.0</availability>
<type>Operator</type>
<partof>PDE</partof>
</root>