Package gui

Source Code of gui.FigureLine

package gui;

import java.awt.geom.Line2D;

import tikzmodel.TikzLine;

public class FigureLine extends Figure {
 
  /**
   * Create a FigureCircle using the given Circle object <code>c</code>.
   *
   * @param c
   *   Circle to be used for this figure.
   */
  public FigureLine(TikzLine line) {
    super(line);
  }

  @Override
  public void updateShape() {
    TikzLine line = (TikzLine) f;
   
    double x1 = line.getOrigin().getX().getValue();
    double y1 = line.getOrigin().getY().getValue();
    double x2 = line.getSize().getX().getValue();
    double y2 = line.getSize().getY().getValue();
   
    s = new Line2D.Double(x1, y1, x2, y2);
  }

}
TOP

Related Classes of gui.FigureLine

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.