Examples of ColorEffect


Examples of org.newdawn.slick.font.effects.ColorEffect

    }

    Log.debug(formatLoadMsg("Unicode font", key, ttfFile));
    UnicodeFont unicodeFont = new UnicodeFont(baseDir + ttfFile, fontSize,
        false, false);
    unicodeFont.getEffects().add(new ColorEffect());
    unicodeFont.addAsciiGlyphs();
    unicodeFont.loadGlyphs();
    unicodeFont.setDisplayListCaching(true);
    ResourceManager.addFont(key, unicodeFont);
  }
View Full Code Here

Examples of org.newdawn.slick.font.effects.ColorEffect

        world.setContactListener(cl);
        goali=0;
        resi=0;
        scoreFont = new UnicodeFont("airhockey/assets/digital-7.ttf", 72, false, false);
        scoreFont.addAsciiGlyphs();
        scoreFont.getEffects().add(new ColorEffect());
       
        resultFont = new org.newdawn.slick.UnicodeFont(new java.awt.Font("Lucida Bright",0,35),35,false,false);
        resultFont.addAsciiGlyphs();
        resultFont.getEffects().add(new ColorEffect());
       
       
        imgBackground = new Image("airhockey/assets/bg.png");
        imgPuck = new Image("airhockey/assets/puck.png");
        imgMallet = new Image("airhockey/assets/mallet.png");
View Full Code Here

Examples of org.newdawn.slick.font.effects.ColorEffect

        // Police normale
        Font font = new Font("Tahoma", Font.BOLD, 18);
        UnicodeFont police = new UnicodeFont(font, font.getSize(), font.isBold(), font.isItalic());
        //police.getEffects().add(new ColorEffect(Color.BLACK));
        //police.getEffects().add(new ShadowEffect(Color.WHITE, 1, 1, 1));
        police.getEffects().add(new ColorEffect(Color.WHITE));
        police.getEffects().add(new OutlineEffect(1, Color.BLACK));
        police.addAsciiGlyphs();
        police.loadGlyphs();
        polices.add(police);
    }
View Full Code Here

Examples of org.newdawn.slick.font.effects.ColorEffect

  @SuppressWarnings("unchecked")
  public UnicodeFont UIFont() {
    if (sUIFont != null) return sUIFont;
    sUIFont = new UnicodeFont(new Font("Arial", 0, 14));
    try {
      sUIFont.getEffects().add(new ColorEffect(Color.white));
      sUIFont.addAsciiGlyphs();
      sUIFont.loadGlyphs();
    } catch (Exception e) {
      System.err.println("Unable to load UI font");
      return null;
View Full Code Here

Examples of org.newdawn.slick.font.effects.ColorEffect

  private static void loadFont(String name, Color color, int size)
      throws SlickException {
    String key = getKey(name, color, size);
    UnicodeFont font = new UnicodeFont(name, size, false, false);
    font.addAsciiGlyphs();
    font.getEffects().add(new ColorEffect(color));
    font.loadGlyphs();
    cache.put(key, font);
  }
View Full Code Here

Examples of org.newdawn.slick.font.effects.ColorEffect

  @SuppressWarnings("unchecked")
  private void initFonts() {
    try {
      sFont = new UnicodeFont("lib/sundaycomicsbb_reg.ttf", 14, false, false);
      sFont.getEffects().add(new ColorEffect(java.awt.Color.white));
      sFont.addAsciiGlyphs();
      sFont.loadGlyphs();
     
      sFont2 = new UnicodeFont("lib/sundaycomicsbb_reg.ttf", 24, false, false);
      sFont2.getEffects().add(new ColorEffect(java.awt.Color.white));
      sFont2.addAsciiGlyphs();
      sFont2.loadGlyphs();
    } catch (Exception e) {
      System.err.println("Failed to load font");
    }
View Full Code Here

Examples of org.newdawn.slick.font.effects.ColorEffect

    renderingBackgroundColor = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue());
    fontList.setSelectedValue(prefs.get("system.font", "Arial"), true);
    fontFileText.setText(prefs.get("font.file", ""));

    java.awt.Color foregroundColor = EffectUtil.fromString(prefs.get("foreground", "ffffff"));
    colorEffect = new ColorEffect();
    colorEffect.setColor(foregroundColor);
    effectsListModel.addElement(colorEffect);
    effectsListModel.addElement(new GradientEffect());
    effectsListModel.addElement(new OutlineEffect());
    effectsListModel.addElement(new OutlineWobbleEffect());
View Full Code Here

Examples of org.newdawn.slick.font.effects.ColorEffect

    unicodeFont = new UnicodeFont("testdata/Lato-Thin.ttf", 48, false, false);
//    unicodeFont.setPaddingBottom(10);
//    unicodeFont.setPaddingRight(10);
//    unicodeFont.setPaddingAdvanceX(-10);
//    unicodeFont.getEffects().add(new ShadowEffect(java.awt.Color.black, 5, 5, 0.5f));
    unicodeFont.getEffects().add(new ColorEffect(java.awt.Color.white));

    // unicodeFont = new UnicodeFont("Arial", 25, false, false);
    // unicodeFont = new UnicodeFont("Everson Mono", 44, false, false);

    // font.addGlyphs(0, 255);
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.