Package net.wigis.graph.dnv.utilities

Examples of net.wigis.graph.dnv.utilities.TextStroke


      // rendering the label
      // even though it's a little slower than the other method.
      // Also use this method on a Mac, because other method produces
      // messed up labels.
      Stroke oldStroke = g2d.getStroke();
      Stroke stroke = new TextStroke( label, font, false, false );
      g2d.setStroke( stroke );
      int x1 = (int)tempPos.getX();
      int y1 = (int)tempPos.getY();
      int x2 = (int)tempPos2.getX();
      int y2 = (int)tempPos2.getY();
View Full Code Here


   *            the angle
   */
  private static void drawCurvedString( Graphics2D g2d, String string, Color textColor, Font font, double x, double y, double diameter,
      double startAngle, double angle )
  {
    Stroke stroke = new TextStroke( string, font, false, false );
    g2d.setStroke( stroke );
    g2d.setColor( textColor );
    Shape arc;
    arc = new Arc2D.Double( new Rectangle2D.Double( x, y, diameter, diameter ), startAngle, -angle, Arc2D.OPEN );
    g2d.draw( arc );
View Full Code Here

   *            the angle
   */
  private static void drawOutlinedCurvedString( Graphics2D g2d, String string, Font font, Color outlineColor, Color textColor, double x, double y,
      double diameter, double startAngle, double angle )
  {
    Stroke stroke = new TextStroke( string, font, false, false );
    g2d.setStroke( stroke );
    g2d.setColor( outlineColor );
    Shape arc;
    arc = new Arc2D.Double( new Rectangle2D.Double( x - 1, y - 1, diameter, diameter ), startAngle, -angle, Arc2D.OPEN );
    g2d.draw( arc );
View Full Code Here

    BufferedImage img = new BufferedImage( width, width, BufferedImage.TYPE_INT_RGB );
    Graphics2D g2D = img.createGraphics();
    try
    {
      Shape circle = new Ellipse2D.Double( width / 4.0, width / 4.0, width / 4.0 * 3.0, height / 4.0 * 3.0 );
      Stroke stroke = new TextStroke( text, new Font( "SansSerif", Font.PLAIN, 12 ) );
      g2D.setStroke( stroke );
      g2D.draw( circle );
      OutputStream out = response.getOutputStream();
      ImageIO.write( img, "gif", out );
      out.flush();
View Full Code Here

TOP

Related Classes of net.wigis.graph.dnv.utilities.TextStroke

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.