Skip to content

Commit c58f748

Browse files
authored
*: Fix style (#1)
Signed-off-by: Ce Gao <ce.gao@outlook.com>
1 parent 7d2e3ac commit c58f748

27 files changed

+72
-50
lines changed

css/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,8 @@ pre {
584584
tr.name-row { height: 60px; }
585585
td p { margin-top: 0; }
586586

587-
.example { clear: both; margin-bottom: 15px; width:600px; }
588-
.example pre.margin { margin-left: 115px; overflow:scroll; }
587+
.example img { float: left; margin-right: 15px; margin-bottom: 15px; }
588+
.example { clear: both; margin-bottom: 15px; }
589589
.example pre.margin { margin-left: 115px; }
590590
hr.noshade { height: 0px; color: #f1f1f1; border-color: #e0e0e0; margin: 30px 0 30px 0; clear: both; }
591591

reference/ambientLight.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
draw &lt;- function() {
6666
background(0)
6767
noStroke()
68-
# The spheres are white by default so the ambient light changes their color
68+
# The spheres are white by default so the ambient light changes
69+
# their color
6970
ambientLight(51, 102, 126)
7071
translate(20, 50, 0)
7172
sphere(30)

reference/applyMatrix.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
ct = cos(PI/9)
5555
st = sin(PI/9)
5656
# Matrix for rotation around the Y axis
57-
applyMatrix(ct, 0, st, 0, 0, 1, 0, 0, -st, 0, ct, 0, 0, 0, 0, 1)
57+
applyMatrix(ct, 0, st, 0, 0, 1, 0, 0, -st, 0, ct, 0, 0, 0, 0,
58+
1)
5859
stroke(255)
5960
box(50)
6061
}

reference/beginContour.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040

4141
<tr class=""><th scope="row">Examples</th><td>
4242
<div class="example"> <img src="img/beginContour1.png"/>
43-
<pre class='margin'># beginContour 1 https://processing.org/reference/beginContour_.html
43+
<pre class='margin'># beginContour 1
44+
# https://processing.org/reference/beginContour_.html
4445

4546
size(100, 100)
4647
translate(50, 50)

reference/bezierTangent.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040

4141
<tr class=""><th scope="row">Examples</th><td>
4242
<div class="example"> <img src="img/bezierTangent2.png"/>
43-
<pre class='margin'># bezierTangent 2 https://processing.org/reference/bezierTangent_.html
43+
<pre class='margin'># bezierTangent 2
44+
# https://processing.org/reference/bezierTangent_.html
4445

4546
noFill()
4647
bezier(85, 20, 10, 10, 90, 90, 15, 80)
@@ -59,7 +60,8 @@
5960
</pre>
6061
</div>
6162
<div class="example"> <img src="img/bezierTangent1.png"/>
62-
<pre class='margin'># bezierTangent 1 https://processing.org/reference/bezierTangent_.html
63+
<pre class='margin'># bezierTangent 1
64+
# https://processing.org/reference/bezierTangent_.html
6365

6466
noFill()
6567
bezier(85, 20, 10, 10, 90, 90, 15, 80)
@@ -78,8 +80,8 @@
7880
a = a + PI
7981
stroke(255, 102, 0)
8082
line(x, y, cos(a) * 30 + x, sin(a) * 30 + y)
81-
# The following line of code makes a line inverse of the above line line(x, y,
82-
# cos(a)*-30 + x, sin(a)*-30 + y)
83+
# The following line of code makes a line inverse of the above
84+
# line line(x, y, cos(a)*-30 + x, sin(a)*-30 + y)
8385
stroke(0)
8486
ellipse(x, y, 5, 5)
8587
}

reference/bezierVertex.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040

4141
<tr class=""><th scope="row">Examples</th><td>
4242
<div class="example"> <img src="img/bezierVertex1.png"/>
43-
<pre class='margin'># bezierVertex 1 https://processing.org/reference/bezierVertex_.html
43+
<pre class='margin'># bezierVertex 1
44+
# https://processing.org/reference/bezierVertex_.html
4445

4546
noFill()
4647
beginShape()
@@ -50,7 +51,8 @@
5051
</pre>
5152
</div>
5253
<div class="example"> <img src="img/bezierVertex2.png"/>
53-
<pre class='margin'># bezierVertex 2 https://processing.org/reference/bezierVertex_.html
54+
<pre class='margin'># bezierVertex 2
55+
# https://processing.org/reference/bezierVertex_.html
5456

5557
beginShape()
5658
vertex(30, 20)

reference/color.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
<div class="example"> <img src="img/color3.png"/>
6262
<pre class='margin'>noStroke() # Don&#39;t draw a stroke around shapes
6363

64-
# If no colorMode is specified, then the default of RGB with scale of 0-255 is
65-
# used.
64+
# If no colorMode is specified, then the default of RGB with scale
65+
# of 0-255 is used.
6666
c = color(50, 55, 100) # Create a color for &#39;c&#39;
6767
fill(c) # Use color variable &#39;c&#39; as fill color
6868
rect(0, 10, 45, 80) # Draw left rect

reference/colorMode.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
</pre>
5252
</div>
5353
<div class="example"> <img src="img/colorMode3.png"/>
54-
<pre class='margin'># If the color is defined here, it won&#39;t be affected by the colorMode() in
55-
# setup(). Instead, just declare the variable here and assign the value after
56-
# the colorMode() in setup() color bg = color(180, 50, 50); # No
54+
<pre class='margin'># If the color is defined here, it won&#39;t be affected by the
55+
# colorMode() in setup(). Instead, just declare the variable here
56+
# and assign the value after the colorMode() in setup() color bg =
57+
# color(180, 50, 50); # No
5758

5859
bg &lt;- NULL
5960

reference/createImage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
img$set(i, j, color(0, 9, 102))
4848
}
4949
}
50-
img.updatePixels()
50+
img$updatePixels()
5151
image(img, 17, 17)
5252
</pre>
5353
</div>

reference/createShape.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
}
4545

4646
setup &lt;- function() {
47-
# Creating the PShape as a square. The numeric arguments are similar to rect().
47+
# Creating the PShape as a square. The numeric arguments are
48+
# similar to rect().
4849
s = createShape()
4950
s$beginShape(TRIANGLE_STRIP)
5051
s$vertex(30, 75)
@@ -93,7 +94,8 @@
9394
}
9495

9596
setup &lt;- function() {
96-
# Creating the PShape as a square. The numeric arguments are similar to rect().
97+
# Creating the PShape as a square. The numeric arguments are
98+
# similar to rect().
9799
s = createShape()
98100
s$beginShape()
99101
s$fill(0, 0, 255)
@@ -115,7 +117,8 @@
115117
}
116118

117119
setup &lt;- function() {
118-
# Creating the PShape as a square. The numeric arguments are similar to rect().
120+
# Creating the PShape as a square. The numeric arguments are
121+
# similar to rect().
119122
square = createShape(RECT, 0, 0, 50, 50)
120123
square$setFill(color(0, 0, 255))
121124
square$setStroke(FALSE)

reference/cursor.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
</tr>
4040

4141
<tr class=""><th scope="row">Examples</th><td>
42-
<div class="example"> <pre># Move the mouse left and right across the image to see the cursor change from a
43-
# cross to a hand
42+
<div class="example"> <pre># Move the mouse left and right across the image to see the cursor
43+
# change from a cross to a hand
4444

4545
draw &lt;- function() {
4646
if (mouseX &lt; 50) {

reference/curveTangent.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040

4141
<tr class=""><th scope="row">Examples</th><td>
4242
<div class="example"> <img src="img/curveTangent1.png"/>
43-
<pre class='margin'># curveTangent 1 https://processing.org/reference/curveTangent_.html
43+
<pre class='margin'># curveTangent 1
44+
# https://processing.org/reference/curveTangent_.html
4445

4546
noFill()
4647
curve(5, 26, 73, 24, 73, 61, 15, 65)

reference/dist.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
</tr>
4040

4141
<tr class=""><th scope="row">Examples</th><td>
42-
<div class="example"> <pre># Sets the background gray value based on the distance of the mouse from the
43-
# center of the screen
42+
<div class="example"> <pre># Sets the background gray value based on the distance of the
43+
# mouse from the center of the screen
4444
draw &lt;- function() {
4545
noStroke()
4646
d = dist(width/2, height/2, mouseX, mouseY)

reference/keyPressedVar.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
<tr class=""><th scope="row">Examples</th><td>
4242
<div class="example"> <pre># Click on the image to give it focus, and then press any key.
4343

44-
# Note: The rectangle in this example may flicker as the operating system may
45-
# register a long key press as a repetition of key presses.
44+
# Note: The rectangle in this example may flicker as the operating
45+
# system may register a long key press as a repetition of key
46+
# presses.
4647

4748
draw &lt;- function() {
4849
if (keyPressedVar == TRUE) {

reference/keyTyped.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
</tr>
4040

4141
<tr class=""><th scope="row">Examples</th><td>
42-
<div class="example"> <pre># Run this program to learn how each of these functions relate to the others.
42+
<div class="example"> <pre># Run this program to learn how each of these functions relate to
43+
# the others.
4344

4445
draw &lt;- function() {
4546
} # Empty draw() needed to keep the program running

reference/mouseButtonVar.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
</tr>
4040

4141
<tr class=""><th scope="row">Examples</th><td>
42-
<div class="example"> <pre># Click within the image and press the left and right mouse buttons to change the
43-
# value of the rectangle
42+
<div class="example"> <pre># Click within the image and press the left and right mouse
43+
# buttons to change the value of the rectangle
4444
draw &lt;- function() {
4545
rect(25, 25, 50, 50)
4646
}
@@ -56,8 +56,8 @@
5656
}
5757
</pre>
5858
</div>
59-
<div class="example"> <pre># Click within the image and press the left and right mouse buttons to change the
60-
# value of the rectangle
59+
<div class="example"> <pre># Click within the image and press the left and right mouse
60+
# buttons to change the value of the rectangle
6161
draw &lt;- function() {
6262
if (mousePressedVar &amp;&amp; (mouseButtonVar == LEFT)) {
6363
fill(0)

reference/mouseClicked.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
</tr>
4040

4141
<tr class=""><th scope="row">Examples</th><td>
42-
<div class="example"> <pre># Click within the image to change the value of the rectangle after after the
43-
# mouse has been clicked
42+
<div class="example"> <pre># Click within the image to change the value of the rectangle
43+
# after after the mouse has been clicked
4444

4545
value &lt;- 0
4646

reference/mouseDragged.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
</tr>
4040

4141
<tr class=""><th scope="row">Examples</th><td>
42-
<div class="example"> <pre># Drag (click and hold) your mouse across the image to change the value of the
43-
# rectangle
42+
<div class="example"> <pre># Drag (click and hold) your mouse across the image to change the
43+
# value of the rectangle
4444

4545
value &lt;- 0
4646

reference/noiseDetail.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,13 @@
4646
for (y in 0:height) {
4747
for (x in 0:width/2) {
4848
noiseDetail(3, 0.5)
49-
noiseVal = noise((mouseX + x) * noiseScale, (mouseY + y) * noiseScale)
49+
noiseVal = noise((mouseX + x) * noiseScale, (mouseY +
50+
y) * noiseScale)
5051
stroke(noiseVal * 255)
5152
point(x, y)
5253
noiseDetail(8, 0.65)
53-
noiseVal = noise((mouseX + x + width/2) * noiseScale, (mouseY + y) *
54-
noiseScale)
54+
noiseVal = noise((mouseX + x + width/2) * noiseScale,
55+
(mouseY + y) * noiseScale)
5556
stroke(noiseVal * 255)
5657
point(x + width/2, y)
5758
}

reference/pmouseX.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
</tr>
4040

4141
<tr class=""><th scope="row">Examples</th><td>
42-
<div class="example"> <pre># Move the mouse quickly to see the difference between the current and previous
43-
# position
42+
<div class="example"> <pre># Move the mouse quickly to see the difference between the current
43+
# and previous position
4444

4545
draw &lt;- function() {
4646
background(204)

reference/pmouseY.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
</tr>
4040

4141
<tr class=""><th scope="row">Examples</th><td>
42-
<div class="example"> <pre># Move the mouse quickly to see the difference between the current and previous
43-
# position
42+
<div class="example"> <pre># Move the mouse quickly to see the difference between the current
43+
# and previous position
4444
draw &lt;- function() {
4545
background(204)
4646
line(20, mouseY, 80, pmouseY)

reference/quadraticVertex.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040

4141
<tr class=""><th scope="row">Examples</th><td>
4242
<div class="example"> <img src="img/quadraticVertex2.png"/>
43-
<pre class='margin'># quadraticVertex 2 https://processing.org/reference/quadraticVertex_.html
43+
<pre class='margin'># quadraticVertex 2
44+
# https://processing.org/reference/quadraticVertex_.html
4445

4546
noFill()
4647
strokeWeight(4)
@@ -53,7 +54,8 @@
5354
</pre>
5455
</div>
5556
<div class="example"> <img src="img/quadraticVertex1.png"/>
56-
<pre class='margin'># quadraticVertex 1 https://processing.org/reference/quadraticVertex_.html
57+
<pre class='margin'># quadraticVertex 1
58+
# https://processing.org/reference/quadraticVertex_.html
5759

5860
noFill()
5961
strokeWeight(4)

reference/screenX.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
stroke(102)
6666
line(x, 0, 0, x, height, 0)
6767

68-
# Draw black line at z = 0 to match the x value element drawn at z = -100
68+
# Draw black line at z = 0 to match the x value element drawn at z
69+
# = -100
6970
stroke(0)
7071
theX = screenX(x, y, z)
7172
line(theX, 0, 0, theX, height, 0)

reference/screenY.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
stroke(102)
6666
line(0, y, 0, width, y, 0)
6767

68-
# Draw black line at z = 0 to match the y value element drawn at z = -100
68+
# Draw black line at z = 0 to match the y value element drawn at z
69+
# = -100
6970
stroke(0)
7071
theY = screenY(x, y, z)
7172
line(0, theY, 0, width, theY, 0)

reference/shape.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
<tr class=""><th scope="row">Examples</th><td>
4242
<div class="example"> <img src="img/shape0.png"/>
4343
<pre class='margin'>setup &lt;- function() {
44-
s = loadShape(&#34;https://raw.githubusercontent.com/processing/processing-docs/master/content/examples/Basics/Shape/LoadDisplaySVG/data/bot1.svg&#34;)
44+
s = loadShape(paste(&#34;https://raw.githubusercontent.com&#34;, &#34;/gaocegege/Processing.R/master/raw-docs&#34;,
45+
&#34;/img/examples/bot1.svg&#34;, sep = &#34;&#34;))
4546
}
4647

4748
draw &lt;- function() {

reference/shapeMode.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<div class="example"> <img src="img/shapeMode0.png"/>
4343
<pre class='margin'>setup &lt;- function() {
4444
size(100, 100)
45-
bot = loadShape(&#34;https://raw.githubusercontent.com/processing/processing-docs/master/content/examples/Basics/Shape/LoadDisplaySVG/data/bot1.svg&#34;)
45+
bot = loadShape(paste(&#34;https://raw.githubusercontent.com&#34;, &#34;/gaocegege/Processing.R/master/raw-docs&#34;,
46+
&#34;/img/examples/bot1.svg&#34;, sep = &#34;&#34;))
4647
}
4748

4849
draw &lt;- function() {

reference/translate.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
}
5454

5555
draw &lt;- function() {
56-
# Translate 30 across, 20 down, and 50 back, or &#39;away&#39; from the screen.
56+
# Translate 30 across, 20 down, and 50 back, or &#39;away&#39; from the
57+
# screen.
5758
translate(30, 20, -50)
5859
rect(0, 0, 55, 55)
5960
}

0 commit comments

Comments
 (0)