Examples of PFont


Examples of processing.core.PFont

    float sin = (float) Math.sin(theta);
    outerX = x + cos * rHi;
    outerY = y + sin * rHi;
    innerX = x + cos * rLo;
    innerY = y + sin * rLo;
    PFont font = menu.style.font;
    FontMetrics fm = UIUtils.getMetrics(menu.buff, font.font, 1);
    float unitTextHeight = (float) fm.getMaxCharBounds(menu.buff.g2)
        .getHeight();
    fontSize = (rHi - rLo) / unitTextHeight * .9f;
    fm = UIUtils.getMetrics(menu.buff, font.font, fontSize);
View Full Code Here

Examples of processing.core.PFont

  public void draw(PApplet sketch) {
    RectStack rectStack = new RectStack();

    for (int i = 0; i < words.length; i++) {
      Word word = words[i];
      PFont wordFont = word.getFont(fonter);
      float wordSize = word.getSize(sizer, i, words.length);
      float wordAngle = word.getAngle(angler);

      Shape shape = shaper.getShapeFor(word.word, wordFont, wordSize, wordAngle);
      Rectangle2D rect = shape.getBounds2D();
View Full Code Here

Examples of processing.core.PFont

   * @return the matching PFont object
   */
  public static PFont getFont(PApplet theApplet, String fontname, int fsize){
    fsize = PApplet.constrain(fsize, 8, 144);
    GFontKey fkey = new GFontKey(fontname, fsize);
    PFont pfont = null;
    // See if the font has already been created
    // if so return it else make it
    if(fontmap.containsKey(fkey))
      pfont = fontmap.get(fkey);
    else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.