Package org.newdawn.slick.font.effects

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


    @SuppressWarnings("unchecked")
    private static void setUpFonts() {
        java.awt.Font awtFont = new java.awt.Font("Times New Roman", java.awt.Font.BOLD, 18);
        font = new UnicodeFont(awtFont);
        font.getEffects().add(new ColorEffect(java.awt.Color.white));
        font.addAsciiGlyphs();
        try {
            font.loadGlyphs();
        } catch (SlickException e) {
            e.printStackTrace();
View Full Code Here


    @SuppressWarnings("unchecked")
    private static void setUpFonts() {
        java.awt.Font awtFont = new java.awt.Font("Helvetica", java.awt.Font.BOLD, 18);
        font = new UnicodeFont(awtFont);
        font.getEffects().add(new ColorEffect(java.awt.Color.white));
        font.addAsciiGlyphs();
        try {
            font.loadGlyphs();
        } catch (SlickException e) {
            e.printStackTrace();
View Full Code Here

    {
    UnicodeFont f = null;
    try
    {
      f = new UnicodeFont("res/thin_pixel-7.ttf", size, false, false);
      f.getEffects().add(new ColorEffect());
        if (rule == 2) f.getEffects().add(new OutlineEffect(size/50, java.awt.Color.black));
        else if (rule == 1) f.getEffects().add(new ShadowEffect(java.awt.Color.gray, size/90, size/90, 0.52f));
      f.addAsciiGlyphs();
      f.setPaddingTop(f.getAscent()/2);
      f.loadGlyphs();
View Full Code Here

      //Code for setting up fonts from: http://slick.cokeandcode.com/wiki/doku.php?id=unicode_font_support
      Font awtFont = new Font("Andale Mono", Font.BOLD, 24);
      basicFont = new UnicodeFont(awtFont, 24, true, false);
      basicFont.addAsciiGlyphs();
      //basicFont.addGlyphs(aNumber,aNotherNumber);  //as above, if we need more glyphs, look them up and add them here
      basicFont.getEffects().add(new ColorEffect(java.awt.Color.WHITE));
      try {
        basicFont.loadGlyphs();
      } catch (SlickException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
View Full Code Here

      //Code for setting up fonts from: http://slick.cokeandcode.com/wiki/doku.php?id=unicode_font_support
      Font awtFont = new Font("Andale Mono", Font.BOLD, 24);
      basicFont = new UnicodeFont(awtFont, 24, true, false);
      basicFont.addAsciiGlyphs();
      //basicFont.addGlyphs(aNumber,aNotherNumber);  //as above, if we need more glyphs, look them up and add them here
      basicFont.getEffects().add(new ColorEffect(java.awt.Color.BLACK));
      try {
        basicFont.loadGlyphs();
      } catch (SlickException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
View Full Code Here

    unicodeFont = new UnicodeFont("c:/windows/fonts/arial.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

    }

    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

        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

        // 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

  @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

TOP

Related Classes of org.newdawn.slick.font.effects.ColorEffect

Copyright © 2018 www.massapicom. 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.