Examples of LineMetrics


Examples of java.awt.font.LineMetrics

            }
         }
      }
      else
      {
         LineMetrics metrics = font.getLineMetrics("ABCxyz",
                 g2.getFontRenderContext());
         maxHeight = metrics.getHeight()
                 + insets.getTop() + insets.getBottom();
      }
      return maxHeight;

   }
View Full Code Here

Examples of java.awt.font.LineMetrics

            }
         }
      }
      else
      {
         LineMetrics metrics = font.getLineMetrics("ABCxyz",
                 g2.getFontRenderContext());
         maxWidth = metrics.getHeight()
                 + insets.getTop() + insets.getBottom();
      }
      return maxWidth;

   }
View Full Code Here

Examples of java.awt.font.LineMetrics

            Paint fill = getFill();
            Paint stroke = getStroke();
            int strokeThickness = getStrokeThickness();

            LineMetrics lm = font.getLineMetrics("", FONT_RENDER_CONTEXT);
            float ascent = lm.getAscent();

            float y = 0;

            for (int i = 0, n = glyphVectors.getLength(); i < n; i++) {
                GlyphVector glyphVector = glyphVectors.get(i);
View Full Code Here

Examples of java.awt.font.LineMetrics

        } else {
            String text = meter.getText();

            if (text != null
                && text.length() > 0) {
                LineMetrics lm = font.getLineMetrics("", FONT_RENDER_CONTEXT);
                preferredHeight = (int)Math.ceil(lm.getHeight()) + 2;
            } else {
                preferredHeight = 0;
            }

            // If the meter has no content, its preferred height is hard-coded by the
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.