Examples of IFont


Examples of org.mt4j.components.visibleComponents.font.IFont

    this.buttonContainer.addChild(fotoButton);
   
    tagToPhoto = new HashMap<MTEllipse, Photo>();
   
    /// Create map provider menu \\\
    IFont font = FontManager.getInstance().createFont(p, "SansSerif.Bold", 15, MTColor.WHITE, MTColor.WHITE);
    MTRoundRectangle mapMenu = new MTRoundRectangle(0,0,0, 220,335, 20,20, p);
//    mapMenu.setFillColor(new MTColor(110,110,110,180));
//    mapMenu.setStrokeColor(new MTColor(110,110,110,180));
    mapMenu.setFillColor(new MTColor(35,35,35,180));
    mapMenu.setStrokeColor(new MTColor(35,35,35,180));
View Full Code Here

Examples of org.mt4j.components.visibleComponents.font.IFont

    this.getCanvas().addChild(puzzleGroup);
   
    //Puzzle tile factory
    this.pf = new PuzzleFactory(getMTApplication());
   
    IFont font = FontManager.getInstance().createFont(mtApplication, "SansSerif", 16, MTColor.WHITE, MTColor.WHITE, false);
   
    //New Puzzle button
    MTRoundRectangle r = getRoundRectWithText(0, 0, 120, 35, "New Puzzle", font);
    r.registerInputProcessor(new TapProcessor(getMTApplication()));
    r.addGestureListener(TapProcessor.class, new DefaultButtonClickAction(r));
View Full Code Here

Examples of org.mt4j.components.visibleComponents.font.IFont

    float horizontalPad = 500;
   
    MTColor white = new MTColor(255,255,255);
    final MTColor textAreaColor = new MTColor(50,50,50,255);
   
    IFont font = FontManager.getInstance().createFont(app, "arial.ttf", 35, white, white);
   
    //Add canvas background gestures
    //Zoom gesture
    MTTextArea backgroundZoom = new MTTextArea(mtApplication, font);
    backgroundZoom.setFillColor(new MTColor(150,150,150));
View Full Code Here

Examples of org.mt4j.components.visibleComponents.font.IFont

    MTColor white = new MTColor(255,255,255);
    this.setClearColor(new MTColor(146, 150, 188, 255));
    //Show touches
    this.registerGlobalInputProcessor(new CursorTracer(mtApplication, this));
   
    IFont fontArial = FontManager.getInstance().createFont(mtApplication, "arial.ttf",
        50,   //Font size
        white,  //Font fill color
        white)//Font outline color
    //Create a textfield
    MTTextArea textField = new MTTextArea(mtApplication, fontArial);
View Full Code Here

Examples of org.mt4j.components.visibleComponents.font.IFont

   
    //Display Score UI
    MTComponent uiLayer = new MTComponent(mtApplication, new MTCamera(mtApplication));
    uiLayer.setDepthBufferDisabled(true);
    getCanvas().addChild(uiLayer);
    IFont font = FontManager.getInstance().createFont(mtApplication, "arial", 50, new MTColor(255,255,255), new MTColor(0,0,0));
   
    t1 = new MTTextArea(mtApplication, font);
    t1.setPickable(false);
    t1.setNoFill(true);
    t1.setNoStroke(true);
View Full Code Here

Examples of org.mt4j.components.visibleComponents.font.IFont

              if (firstValue != null)
                fontFamily = firstValue.getStringValue();
            }
            logger.debug("Font family: " + fontFamily);

            IFont font;
            if (useVectorFont)
              //Vector font
              font = FontManager.getInstance().createFont(pa,
                  "arial.ttf", Math.round(fontSize), fillColor, strokeColor);
            else
              //Bitmap font
              font = FontManager.getInstance().createFont(pa,
//                  "Arial", Math.round(fontSize),
                  fontFamily, Math.round(fontSize), fillColor, strokeColor);
//            /*

            IFont fontToUse = font;
            IFont lastUsedFont = fontToUse;
            List<MTTextArea> textAreas = new ArrayList<MTTextArea>();

            AttributedCharacterIterator iter = tNode.getAttributedCharacterIterator();
            if (font != null && iter != null){ //To avoid not loaded fonts or if text ist empty
              for (int i = iter.getBeginIndex(); i < iter.getEndIndex(); i++) {
View Full Code Here

Examples of org.mt4j.components.visibleComponents.font.IFont

 
  public void testLoadFonts(){
    this.runTest(new TestRunnable() {
      @Override
      public void runMTTestCode() {
        IFont font1 = FontManager.getInstance().createFont(getMTApplication(), "arial.ttf", 16, MTColor.GREY, MTColor.GREY, true);
        IFont font2 = FontManager.getInstance().createFont(getMTApplication(), "arial", 16, MTColor.BLACK, MTColor.BLACK, false);
       
        MTTextArea ta = new MTTextArea(getMTApplication(), font1);
        ta.setText("this is a\ntest text written for testing\npurposes");
        scene.getCanvas().addChild(ta);
        ta.setFont(font2);
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.