Skip to content

Commit 2de6caa

Browse files
committed
New code colors for testing 2b8
1 parent 0ad9ce8 commit 2de6caa

File tree

7 files changed

+30
-25
lines changed

7 files changed

+30
-25
lines changed

core/src/processing/core/PApplet.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5846,9 +5846,8 @@ static public String[] fixOptions(String options) {
58465846
* ( end auto-generated )
58475847
* @webref typography:loading_displaying
58485848
* @param filename name of the font to load
5849-
* @see PFont#PFont
5849+
* @see PFont#PFont(Font, boolean)
58505850
* @see PGraphics#textFont(PFont, float)
5851-
* @see PGraphics#text(String, float, float, float, float, float)
58525851
* @see PApplet#createFont(String, float, boolean, char[])
58535852
*/
58545853
public PFont loadFont(String filename) {
@@ -12300,7 +12299,6 @@ public float textWidth(char[] chars, int start, int length) {
1230012299
* @see PGraphics#textAlign(int, int)
1230112300
* @see PGraphics#textMode(int)
1230212301
* @see PApplet#loadFont(String)
12303-
* @see PFont#PFont
1230412302
* @see PGraphics#textFont(PFont)
1230512303
* @see PGraphics#rectMode(int)
1230612304
* @see PGraphics#fill(int, float)

core/src/processing/core/PFont.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
* ^^^^^^^^^^^^^^ setWidth (width displaced by char)
5353
* </PRE>
5454
* @webref typography
55+
* @see PApplet#loadFont(String)
56+
* @see PGraphics#textFont(PFont)
57+
* @see PGraphics#text(char, float, float)
5558
*/
5659
public class PFont implements PConstants {
5760

@@ -181,11 +184,8 @@ public PFont() { } // for subclasses
181184
* ( end auto-generated )
182185
*
183186
* @webref typography:pfont
184-
* @param font
185-
* @param smooth
186-
* @see PApplet#loadFont(String)
187-
* @see PGraphics#textFont(PFont, float)
188-
* @see PGraphics#text(String, float, float)
187+
* @param font font the font object to create from
188+
* @param smooth smooth true to enable smoothing/anti-aliasing
189189
*/
190190
public PFont(Font font, boolean smooth) {
191191
this(font, smooth, null);
@@ -196,9 +196,7 @@ public PFont(Font font, boolean smooth) {
196196
* Create a new image-based font on the fly. If charset is set to null,
197197
* the characters will only be created as bitmaps when they're drawn.
198198
*
199-
* @param font the font object to create from
200199
* @param charset array of all unicode chars that should be included
201-
* @param smooth true to enable smoothing/anti-aliasing
202200
*/
203201
public PFont(Font font, boolean smooth, char charset[]) {
204202
// save this so that we can use the native version

core/src/processing/core/PGraphics.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4188,7 +4188,6 @@ protected float textWidthImpl(char buffer[], int start, int stop) {
41884188
* @see PGraphics#textAlign(int, int)
41894189
* @see PGraphics#textMode(int)
41904190
* @see PApplet#loadFont(String)
4191-
* @see PFont#PFont
41924191
* @see PGraphics#textFont(PFont)
41934192
* @see PGraphics#rectMode(int)
41944193
* @see PGraphics#fill(int, float)

java/examples/Basics/Typography/Letters/Letters.pde

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
*/
77

88
// The next line is needed if running in JavaScript Mode with Processing.js
9-
/* @pjs font="Georgia.ttf"; */
9+
/* @pjs font="Courier.ttf"; */
10+
11+
PFont f;
1012

1113
void setup() {
1214
size(640, 360);
1315
background(0);
1416

1517
// Create the font
16-
textFont(createFont("Georgia",24));
18+
println(PFont.list());
19+
f = createFont("Monospaced", 24);
20+
textFont(f);
1721
textAlign(CENTER, CENTER);
1822
}
1923

@@ -33,10 +37,10 @@ void draw() {
3337
char letter = char(counter);
3438

3539
if (letter == 'A' || letter == 'E' || letter == 'I' || letter == 'O' || letter == 'U') {
36-
fill(255);
40+
fill(255, 204, 0);
3741
}
3842
else {
39-
fill(102);
43+
fill(255);
4044
}
4145

4246
// Draw the letter to the screen

java/examples/Basics/Typography/Words/Words.pde

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@
99
// The next line is needed if running in JavaScript Mode with Processing.js
1010
/* @pjs font="Georgia.ttf"; */
1111

12+
PFont f;
13+
1214
void setup() {
1315
size(640, 360);
16+
1417
// Create the font
15-
textFont(createFont("Georgia", 24));
18+
println(PFont.list());
19+
f = createFont("Serif", 24);
20+
textFont(f);
1621
}
1722

1823
void draw() {

java/keywords.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ catch FUNCTION3 catch
247247
do FUNCTION3
248248
for FUNCTION3 for
249249
if FUNCTION3 if
250-
#else FUNCTION3 else
250+
else FUNCTION3 else
251251
switch FUNCTION3 switch
252252
synchronized FUNCTION3
253253
while FUNCTION3 while
@@ -279,7 +279,6 @@ saveFile FUNCTION1
279279
savePath FUNCTION1
280280
sketchFile FUNCTION1
281281
sketchPath FUNCTION1
282-
string KEYWORD2 strconvert_
283282

284283
readLine FUNCTION2 BufferedReader_readLine_
285284
close FUNCTION2 PrintWriter_close_
@@ -294,6 +293,8 @@ substring FUNCTION2 String_substring_
294293
toLowerCase FUNCTION2 String_toLowerCase_
295294
toUpperCase FUNCTION2 String_toUpperCase_
296295

296+
length KEYWORD2 String
297+
297298

298299
# Temporary additions 3 September 2012 as the reference is getting updated
299300

@@ -340,8 +341,8 @@ addChild FUNCTION1
340341

341342
# Suppressed from Generate to avoid conflicts with variables inside methods
342343

343-
width KEYWORD3 width_
344-
height KEYWORD3 height_
344+
width KEYWORD4 width_
345+
height KEYWORD4 height_
345346

346347
PVector FUNCTION1 PVector
347348
ArrayList FUNCTION1 ArrayList

java/theme/theme.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ editor.brackethighlight.color = #006699
7878
editor.function1.style = #006699,plain
7979
editor.function2.style = #006699,plain
8080
editor.function3.style = #669933,plain
81-
editor.keyword1.style = #7e3d22,plain
82-
editor.keyword2.style = #EE3C96,plain
81+
editor.keyword1.style = #996633,plain
82+
editor.keyword2.style = #996633,plain
8383
editor.keyword3.style = #669933,plain
84-
editor.keyword4.style = #EE3C96,plain
85-
editor.keyword5.style = #D86736,plain
84+
editor.keyword4.style = #ff6699,plain
85+
editor.keyword5.style = #cc6633,plain
8686
editor.literal1.style = #7D4793,plain
87-
editor.literal2.style = #5F6C53,plain
87+
editor.literal2.style = #666666,plain
8888

8989
# e.g. + - = /
9090
editor.operator.style = #006699,plain

0 commit comments

Comments
 (0)