mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
include an error when textFont not set
This commit is contained in:
@@ -1987,6 +1987,10 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* ignored.
|
||||
*/
|
||||
public void text(String str, float x, float y) {
|
||||
if (textFont == null) {
|
||||
throw new RuntimeException("use textFont() before text()");
|
||||
}
|
||||
|
||||
if (textMode == SCREEN) loadPixels();
|
||||
|
||||
int length = str.length();
|
||||
|
||||
Reference in New Issue
Block a user