Java Code Examples for processing.core.PApplet#createFont()
The following examples show how to use
processing.core.PApplet#createFont() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SurfaceMapper.java From sketch-mapper with MIT License | 6 votes |
/** * Create instance of IxKeystone * * @param parent * @param width * @param height */ public SurfaceMapper(PApplet parent, int width, int height) { this.parent = parent; this.enableMouseEvents(); this.parent.registerMethod("keyEvent", this); this.width = width; this.height = height; this.ccolor = new int[0]; this.idFont = parent.createFont("Verdana", 80); this.setSelectionMouseColor(0xFFCCCCCC); surfaces = new ArrayList<SuperSurface>(); selectedSurfaces = new ArrayList<SuperSurface>(); allowUserInput = true; enableSelectionMouse = true; }
Example 2
Source File: CustomFontText2D_DEPRECATE.java From haxademic with MIT License | 5 votes |
public CustomFontText2D_DEPRECATE( PApplet p, String fontFile, float fontSize, int color, int align, int canvasW, int canvasH ) { _fontSize = fontSize; _textLeading = (int) fontSize; _textColor = color; _textStroke = p.color(255); _font = p.createFont( fontFile, _fontSize ); _textAlign = align; _textCanvas = p.createGraphics( canvasW, canvasH, P.P2D ); // P.P2D? Whay does this cause issues in Catchy? _textCanvas.smooth( OpenGLUtil.SMOOTH_MEDIUM ); }
Example 3
Source File: ProgramOptionsMenu.java From sketch-mapper with MIT License | 4 votes |
public ProgramOptionsMenu(final PApplet parent, final ControlP5 controlP5) { this.parent = parent; smallFont = parent.createFont("Verdana", 11, false); // Program options menu programGroup = controlP5.addGroup("Program options") .setPosition(20, 40) .setBackgroundHeight(150) .setWidth(280) .setBarHeight(20) .setBackgroundColor(parent.color(0, 50)); programGroup.getCaptionLabel().getStyle().marginTop = 6; // Create new quad button controlP5.addButton("Add Quad Surface") .setPosition(10, 20) .setWidth(125) .setId(1) .setGroup(programGroup); // Create new bezier button controlP5.addButton("Add Bezier Surface") .setPosition(140, 20) .setWidth(125) .setId(2) .setGroup(programGroup); // Load layout button controlP5.addButton("Load Layout from file") .setPosition(10, 60) .setWidth(125) .setId(3) .setGroup(programGroup); // Save layout button controlP5.addButton("Save Layout to file") .setPosition(140, 60) .setWidth(125) .setId(4) .setGroup(programGroup); // Render layout button controlP5.addButton("Render") .setPosition(10, 100) .setWidth(255) .setId(5) .setGroup(programGroup); }