Package com.google.code.appengine.awt.font

Examples of com.google.code.appengine.awt.font.TextLayout.draw()


        // thats why we use it only in the case of TEXT_AS_SHAPES,
        // otherwise tagged strings are always written as glyphs
        if (isProperty(TEXT_AS_SHAPES)) {
            // draws all attributes
            TextLayout tl = new TextLayout(iterator, getFontRenderContext());
            tl.draw(this, x, y);
        } else {
            // reset to that font at the end
            Font font = getFont();

            // initial attributes, we us TextAttribute.equals() rather
View Full Code Here


      while( ( titleTextLayout = measurer.nextLayout( wrappingWidth ) ) != null )
      {
        //---set the current line to where the title will be written
        currentLine += titleTextLayout.getAscent();

        titleTextLayout.draw( this.getGraphics2D(),
                       ( ( this.getImageWidth() - titleTextLayout.getAdvance() ) / 2 ),
                       currentLine );

        //---keep track of total height of all the title lines
        height +=  titleTextLayout.getAscent() + titleTextLayout.getDescent();
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.