forked from processing-js/processing-js.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPShape_setVisible_.html
More file actions
67 lines (60 loc) · 1.75 KB
/
Copy pathPShape_setVisible_.html
File metadata and controls
67 lines (60 loc) · 1.75 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
---
layout: default
---
<table cellpadding="0" cellspacing="0" border="0" class="ref-item">
<tr>
<th scope="row">Class</th>
<td>PShape</td>
</tr>
<tr class="name-row">
<th scope="row">Name</th>
<td><h3>setVisible()</h3></td>
</tr>
<tr class="">
<th scope="row">Examples</th>
<td><div class="example"><img src="/reference/PShape_visible.jpg" alt="example pic" /><pre class="margin">// The file "bot.svg" must be in the data folder
// of the current sketch to load successfully
PShape s;
s = loadShape("bot.svg");
smooth();
shape(s, 10, 10, 80, 80); // Right shape
s.setVisible(false);
if (s.isVisible() == false) { // of if (!s.isVisible) {
noFill();
rect(5, 5, 90, 90);
}</pre></div></td>
</tr>
<tr class="">
<th scope="row">Description</th>
<td><p>Sets the shape to be visible or invisible. This is determined by the value of the <b>visible</b> parameter. </p>
<p>The visibility of a shape is usually controlled by whatever program created the SVG file.
For instance, this parameter is controlled by showing or hiding the shape in the layers palette in Adobe Illustrator.</p></td>
</tr>
<tr class="">
<th scope="row">Syntax</th>
<td><pre><kbd>sh</kbd>.setVisible(<kbd>visible</kbd>)</pre></td>
</tr>
<tr class="">
<th scope="row">Parameters</th>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr class="">
<th scope="row">sh</th>
<td>PShape: any variable of type PShape</td>
</tr>
<tr class="">
<th scope="row">visible</th>
<td>Boolean: "false" makes the shape invisible and "true" makes it visible</td>
</tr>
</table>
</td>
</tr>
<tr class="">
<th scope="row">Returns</th>
<td>none</td>
</tr>
<tr class="">
<th scope="row">Usage</th>
<td>Web & Application</td>
</tr>
</table>