Package java.awt

Examples of java.awt.Graphics2D.drawGlyphVector()


        }
        fracHint = graphics.getRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS);
        graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, fractionalFontMetricsHint);

        GlyphVector vector = ((AWTFSGlyphVector)fsGlyphVector).getGlyphVector();
        graphics.drawGlyphVector(vector, (int)x, (int)y );
        if ( graphics.getFont().getSize() > threshold ) {
            graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, aaHint );
        }
        graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, fracHint);
    }
View Full Code Here


      // to parent by default
      //g2d.setTransform(at);
      g2d.transform(at);
      AffineTransform defStat=g2d.getTransform();
      GlyphVector gv=font.createGlyphVector(frc, majArr[0].toString());
      g2d.drawGlyphVector(gv, 0, 0);

      at=AffineTransform.getTranslateInstance(82,15);
      double rot=30*radF;
      at.rotate(rot);
      int count=majArr.length;
View Full Code Here

      at.rotate(rot);
      int count=majArr.length;
      for (int i=1;i<count;i++) {
        g2d.transform(at);
        gv=font.createGlyphVector(frc, majArr[i].toString());
        g2d.drawGlyphVector(gv, 0, 0);
      }

      // move char's height down
      at=AffineTransform.getTranslateInstance(0, 45);
      // but stay at default transformation (see above)
View Full Code Here

      at=AffineTransform.getTranslateInstance(0, 45);
      // but stay at default transformation (see above)
      g2d.setTransform(defStat);
      g2d.transform(at);
      gv=font.createGlyphVector(frc, minArr[0].toString());
      g2d.drawGlyphVector(gv, 0, 0);

      at=AffineTransform.getTranslateInstance(58,10);
      rot=30*radF;
      at.rotate(rot);
      for (int i=1;i<count;i++) {
View Full Code Here

      rot=30*radF;
      at.rotate(rot);
      for (int i=1;i<count;i++) {
        g2d.transform(at);
        gv=font.createGlyphVector(frc, minArr[i].toString());
        g2d.drawGlyphVector(gv, 0, 0);
      }
    }

    private int getIndexOfName(NoteName n,
      Map<NoteName, Integer> m) {
View Full Code Here

        GlyphVector vector = graphics.getFont().createGlyphVector(
                graphics.getFontRenderContext(), string);
       
        adjustGlyphPositions(string, info, vector);
       
        graphics.drawGlyphVector(vector, x, y);
       
        if ( graphics.getFont().getSize() > threshold ) {
            graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, prevHint );
        }
    }
View Full Code Here

        if ( graphics.getFont().getSize() > threshold ) {
            prevHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING);
            graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint );
        }
        GlyphVector vector = ((AWTFSGlyphVector)fsGlyphVector).getGlyphVector();
        graphics.drawGlyphVector(vector, (int)x, (int)y );
        if ( graphics.getFont().getSize() > threshold ) {
            graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, prevHint );
        }
    }
View Full Code Here

            }

            cursor.setLocation(cursor.getX() + cw + glyphAdjust, cursor.getY());
            gv.setGlyphPosition(i + 1, cursor);
        }
        g2d.drawGlyphVector(gv, x, y);
    }

    /** Saves the current graphics state on the stack. */
    protected void saveGraphicsState() {
        g2dStateStack.push(g2dState);
View Full Code Here

    try {
      Graphics2D g2d = (Graphics2D) g;
      GlyphVector gv = painter.createGlyphVector(g2d,s, font.getSize());
      int descent = metric.getDescent();
      g2d.drawGlyphVector(gv, bounds.x+V_BORDER, bounds.y+bounds.height-descent-H_BORDER);
    } catch (FontFormatException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

        s="";
      }
      Graphics2D g2d = (Graphics2D) g;
      GlyphVector gv = painter.createGlyphVector(g2d,s, font.getSize());
      int descent = metric.getDescent();
      g2d.drawGlyphVector(gv, bounds.x, bounds.y+bounds.height-descent);
    } catch (FontFormatException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
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.