| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5846,9 +5846,8 @@ static public String[] fixOptions(String options) { | |||
| 5846 | 5846 | * ( end auto-generated ) | |
| 5847 | 5847 | * @webref typography:loading_displaying | |
| 5848 | 5848 | * @param filename name of the font to load | |
| 5849 | - * @see PFont#PFont | ||
| 5849 | + * @see PFont#PFont(Font, boolean) | ||
| 5850 | 5850 | * @see PGraphics#textFont(PFont, float) | |
| 5851 | - * @see PGraphics#text(String, float, float, float, float, float) | ||
| 5852 | 5851 | * @see PApplet#createFont(String, float, boolean, char[]) | |
| 5853 | 5852 | */ | |
| 5854 | 5853 | public PFont loadFont(String filename) { | |
@@ -12300,7 +12299,6 @@ public float textWidth(char[] chars, int start, int length) { | |||
| 12300 | 12299 | * @see PGraphics#textAlign(int, int) | |
| 12301 | 12300 | * @see PGraphics#textMode(int) | |
| 12302 | 12301 | * @see PApplet#loadFont(String) | |
| 12303 | - * @see PFont#PFont | ||
| 12304 | 12302 | * @see PGraphics#textFont(PFont) | |
| 12305 | 12303 | * @see PGraphics#rectMode(int) | |
| 12306 | 12304 | * @see PGraphics#fill(int, float) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,6 +52,9 @@ | |||
| 52 | 52 | * ^^^^^^^^^^^^^^ setWidth (width displaced by char) | |
| 53 | 53 | * </PRE> | |
| 54 | 54 | * @webref typography | |
| 55 | + * @see PApplet#loadFont(String) | ||
| 56 | + * @see PGraphics#textFont(PFont) | ||
| 57 | + * @see PGraphics#text(char, float, float) | ||
| 55 | 58 | */ | |
| 56 | 59 | public class PFont implements PConstants { | |
| 57 | 60 | ||
@@ -181,11 +184,8 @@ public PFont() { } // for subclasses | |||
| 181 | 184 | * ( end auto-generated ) | |
| 182 | 185 | * | |
| 183 | 186 | * @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 | ||
| 189 | 189 | */ | |
| 190 | 190 | public PFont(Font font, boolean smooth) { | |
| 191 | 191 | this(font, smooth, null); | |
@@ -196,9 +196,7 @@ public PFont(Font font, boolean smooth) { | |||
| 196 | 196 | * Create a new image-based font on the fly. If charset is set to null, | |
| 197 | 197 | * the characters will only be created as bitmaps when they're drawn. | |
| 198 | 198 | * | |
| 199 | - * @param font the font object to create from | ||
| 200 | 199 | * @param charset array of all unicode chars that should be included | |
| 201 | - * @param smooth true to enable smoothing/anti-aliasing | ||
| 202 | 200 | */ | |
| 203 | 201 | public PFont(Font font, boolean smooth, char charset[]) { | |
| 204 | 202 | // save this so that we can use the native version | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4188,7 +4188,6 @@ protected float textWidthImpl(char buffer[], int start, int stop) { | |||
| 4188 | 4188 | * @see PGraphics#textAlign(int, int) | |
| 4189 | 4189 | * @see PGraphics#textMode(int) | |
| 4190 | 4190 | * @see PApplet#loadFont(String) | |
| 4191 | - * @see PFont#PFont | ||
| 4192 | 4191 | * @see PGraphics#textFont(PFont) | |
| 4193 | 4192 | * @see PGraphics#rectMode(int) | |
| 4194 | 4193 | * @see PGraphics#fill(int, float) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,14 +6,18 @@ | |||
| 6 | 6 | */ | |
| 7 | 7 | ||
| 8 | 8 | // 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; | ||
| 10 | 12 | ||
| 11 | 13 | void setup() { | |
| 12 | 14 | size(640, 360); | |
| 13 | 15 | background(0); | |
| 14 | 16 | ||
| 15 | 17 | // Create the font | |
| 16 | - textFont(createFont("Georgia",24)); | ||
| 18 | + println(PFont.list()); | ||
| 19 | + f = createFont("Monospaced", 24); | ||
| 20 | + textFont(f); | ||
| 17 | 21 | textAlign(CENTER, CENTER); | |
| 18 | 22 | } | |
| 19 | 23 | ||
@@ -33,10 +37,10 @@ void draw() { | |||
| 33 | 37 | char letter = char(counter); | |
| 34 | 38 | ||
| 35 | 39 | if (letter == 'A' || letter == 'E' || letter == 'I' || letter == 'O' || letter == 'U') { | |
| 36 | - fill(255); | ||
| 40 | + fill(255, 204, 0); | ||
| 37 | 41 | } | |
| 38 | 42 | else { | |
| 39 | - fill(102); | ||
| 43 | + fill(255); | ||
| 40 | 44 | } | |
| 41 | 45 | ||
| 42 | 46 | // Draw the letter to the screen | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,10 +9,15 @@ | |||
| 9 | 9 | // The next line is needed if running in JavaScript Mode with Processing.js | |
| 10 | 10 | /* @pjs font="Georgia.ttf"; */ | |
| 11 | 11 | ||
| 12 | + PFont f; | ||
| 13 | + | ||
| 12 | 14 | void setup() { | |
| 13 | 15 | size(640, 360); | |
| 16 | + | ||
| 14 | 17 | // Create the font | |
| 15 | - textFont(createFont("Georgia", 24)); | ||
| 18 | + println(PFont.list()); | ||
| 19 | + f = createFont("Serif", 24); | ||
| 20 | + textFont(f); | ||
| 16 | 21 | } | |
| 17 | 22 | ||
| 18 | 23 | void draw() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -247,7 +247,7 @@ catch FUNCTION3 catch | |||
| 247 | 247 | do FUNCTION3 | |
| 248 | 248 | for FUNCTION3 for | |
| 249 | 249 | if FUNCTION3 if | |
| 250 | - #else FUNCTION3 else | ||
| 250 | + else FUNCTION3 else | ||
| 251 | 251 | switch FUNCTION3 switch | |
| 252 | 252 | synchronized FUNCTION3 | |
| 253 | 253 | while FUNCTION3 while | |
@@ -279,7 +279,6 @@ saveFile FUNCTION1 | |||
| 279 | 279 | savePath FUNCTION1 | |
| 280 | 280 | sketchFile FUNCTION1 | |
| 281 | 281 | sketchPath FUNCTION1 | |
| 282 | - string KEYWORD2 strconvert_ | ||
| 283 | 282 | ||
| 284 | 283 | readLine FUNCTION2 BufferedReader_readLine_ | |
| 285 | 284 | close FUNCTION2 PrintWriter_close_ | |
@@ -294,6 +293,8 @@ substring FUNCTION2 String_substring_ | |||
| 294 | 293 | toLowerCase FUNCTION2 String_toLowerCase_ | |
| 295 | 294 | toUpperCase FUNCTION2 String_toUpperCase_ | |
| 296 | 295 | ||
| 296 | + length KEYWORD2 String | ||
| 297 | + | ||
| 297 | 298 | ||
| 298 | 299 | # Temporary additions 3 September 2012 as the reference is getting updated | |
| 299 | 300 | ||
@@ -340,8 +341,8 @@ addChild FUNCTION1 | |||
| 340 | 341 | ||
| 341 | 342 | # Suppressed from Generate to avoid conflicts with variables inside methods | |
| 342 | 343 | ||
| 343 | - width KEYWORD3 width_ | ||
| 344 | - height KEYWORD3 height_ | ||
| 344 | + width KEYWORD4 width_ | ||
| 345 | + height KEYWORD4 height_ | ||
| 345 | 346 | ||
| 346 | 347 | PVector FUNCTION1 PVector | |
| 347 | 348 | ArrayList FUNCTION1 ArrayList | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,13 +78,13 @@ editor.brackethighlight.color = #006699 | |||
| 78 | 78 | editor.function1.style = #006699,plain | |
| 79 | 79 | editor.function2.style = #006699,plain | |
| 80 | 80 | 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 | ||
| 83 | 83 | 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 | ||
| 86 | 86 | editor.literal1.style = #7D4793,plain | |
| 87 | - editor.literal2.style = #5F6C53,plain | ||
| 87 | + editor.literal2.style = #666666,plain | ||
| 88 | 88 | ||
| 89 | 89 | # e.g. + - = / | |
| 90 | 90 | editor.operator.style = #006699,plain | |
| Back | FazBrowse Home | New Git URL |
0 commit comments