Examples of Line


Examples of gab.opencv.Line

   
    Mat lineMat = new Mat();
    Imgproc.HoughLinesP(getCurrentMat(), lineMat, 1, PConstants.PI/180.0, threshold, minLineLength, maxLineGap);
    for (int i = 0; i < lineMat.width(); i++) {
      double[] coords = lineMat.get(0, i);
        result.add(new Line(coords[0], coords[1], coords[2], coords[3]));
    }
   
    return result;
  }
View Full Code Here

Examples of gov.nasa.worldwind.geom.Line

        Position refPos = controlPoint.getPosition();
        if (refPos == null)
            return;

        Line ray = view.computeRayFromScreenPoint(moveToPoint.getX(), moveToPoint.getY());
        Line previousRay = view.computeRayFromScreenPoint(lastMousePoint.getX(), lastMousePoint.getY());

        Vec4 vec = AirspaceEditorUtil.intersectGlobeAt(super._wwd, refPos.getElevation(), ray);
        Vec4 previousVec = AirspaceEditorUtil.intersectGlobeAt(super._wwd, refPos.getElevation(), previousRay);

        if (vec == null || previousVec == null)
View Full Code Here

Examples of ij.gui.Line

                // Creation de 2 lignes

                // Horizontal line of the cross
                // Calculation of x origine
                int origine = x - width / 2;
                roi1 = new Line(origine, y, origine + width, y);

                // Vertical line of the cross
                origine = y - height / 2;
                roi2 = new Line(x, origine, x, origine + height);
                break;
            case TEXT:
                roi = new TextRoi(x, y, imagePlus);
                break;
            case POINT:
View Full Code Here

Examples of it.stefanobertini.zebra.cpcl.labelmode.Line

public class LineTest {

    @Test
    public void testDefault() {
  Line command = new Line(new Position(1, 2), new Position(3, 4));

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("LINE 1 2 3 4 1");

  assertCommand(output, command);
View Full Code Here

Examples of javafx.scene.shape.Line

      }
    });
  }
 
  public static void addMarker(final XYChart<?, ?> chart, final StackPane chartWrap) {
    final Line valueMarker = new Line();
    final Node chartArea = chart.lookup(".chart-plot-background");

    chartArea.setOnMouseMoved(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent event) {
        Point2D scenePoint = chart.localToScene(event.getSceneX(), event.getSceneY());
        Point2D position = chartWrap.sceneToLocal(scenePoint.getX(), scenePoint.getY());
       
        Bounds chartAreaBounds = chartArea.localToScene(chartArea.getBoundsInLocal());
        valueMarker.setStartY(0);
        valueMarker.setEndY(chartWrap.sceneToLocal(chartAreaBounds).getMaxY()-chartWrap.sceneToLocal(chartAreaBounds).getMinY());
       
        valueMarker.setStartX(0);
        valueMarker.setEndX(0);
        valueMarker.setTranslateX(position.getX()-chartWrap.getWidth()/2);
       
        double ydelta = chartArea.localToScene(0, 0).getY()-chartWrap.localToScene(0,0).getY();
        valueMarker.setTranslateY(-ydelta*2);
      }
    });
   
    chartWrap.getChildren().add(valueMarker);
  }
 
View Full Code Here

Examples of javax.sound.sampled.Line

  }

  protected void createSource() throws JavaLayerException {
    Throwable t = null;
    try {
      Line line = AudioSystem.getLine(getSourceLineInfo());
      if (line instanceof SourceDataLine) {
        source = (SourceDataLine) line;
        source.open(audioFormat);
        source.start();
      }
View Full Code Here

Examples of jimm.datavision.Line

*/
public void eachLine(LineDrawer ld, Object arg) {
    Rectangle rect = field.getBounds();
    Section section = field.getSection();
    BorderEdge edge;
    Line line;

    edge = top;
    if (edge != null && edge.getThickness() > 0 && edge.getNumber() > 0) {
  line = new Line(null, section, edge.getThickness(),
      null, true, new Point(rect.x, rect.y),
      new Point(rect.x + rect.width, rect.y));
  for (int i = 0; i < edge.getNumber(); ++i) {
      ld.drawLine(line, arg);
      line.getPoint(0).y += BORDER_LINE_SPACE_MULT;
      line.getPoint(1).y += BORDER_LINE_SPACE_MULT;
  }
    }

    edge = bottom;
    if (edge != null && edge.getThickness() > 0 && edge.getNumber() > 0) {
  line = new Line(null, section, edge.getThickness(),
      null, true, new Point(rect.x, rect.y + rect.height),
      new Point(rect.x + rect.width, rect.y + rect.height));
  for (int i = 0; i < edge.getNumber(); ++i) {
      ld.drawLine(line, arg);
      line.getPoint(0).y -= BORDER_LINE_SPACE_MULT;
      line.getPoint(1).y -= BORDER_LINE_SPACE_MULT;
  }
    }

    edge = left;
    if (edge != null && edge.getThickness() > 0 && edge.getNumber() > 0) {
  line = new Line(null, section, edge.getThickness(),
      null, true, new Point(rect.x, rect.y),
      new Point(rect.x, rect.y + rect.height));
  for (int i = 0; i < edge.getNumber(); ++i) {
      ld.drawLine(line, arg);
      line.getPoint(0).x += BORDER_LINE_SPACE_MULT;
      line.getPoint(1).x += BORDER_LINE_SPACE_MULT;
  }
    }

    edge = right;
    if (edge != null && edge.getThickness() > 0 && edge.getNumber() > 0) {
  line = new Line(null, section, edge.getThickness(),
      null, true, new Point(rect.x + rect.width, rect.y),
      new Point(rect.x + rect.width, rect.y + rect.height));
  for (int i = 0; i < edge.getNumber(); ++i) {
      ld.drawLine(line, arg);
      line.getPoint(0).x -= BORDER_LINE_SPACE_MULT;
      line.getPoint(1).x -= BORDER_LINE_SPACE_MULT;
  }
    }
}
View Full Code Here

Examples of lifesbest23.common.math.Line

            Color clearColor = new Color(0,0,0,0);
            for(Color[] l:toolColors)
              for(int i = 0; i < y; i++)
                l[i] = clearColor;;
            //create Line
            Line c = new Line(new Point(xt, yt),
                  new Point(startX, startY));
            Point[] ps = c.getPoints();
            for(Point p:ps)
              if(p.x >= 0 && p.x < x && p.y >= 0 && p.y < y)
                toolColors[p.x][p.y] = clickColors[buttonPressed + clickCount - 1];
           
            repaint();
View Full Code Here

Examples of main.components.Line

        } else {
            _x = evt.getX();
            _y = evt.getY();
            this.setTitle(String.format("x_first: %s, y_first: %s, x_second: %s, y_second: %s", x, y, _x, _y));
            if(jRadioButtonLine.isSelected()){
                panel.addShape(new Line(x, y, _x, _y));
            }
            if(jRadioButtonOval.isSelected()){
                if(x > _x && y > _y){
                    panel.addShape(new Oval(_x, _y, x - _x, y - _y));
                }
View Full Code Here

Examples of model.Line

  @Test
  public void searchScheduleByLineAndStation()
  {
    Timetable timetable1 = new Timetable();
   
    Line line1 = new Line();
    Station station1 = new Station();
   
    timetable1.setLine(line1);
    timetable1.setStation(station1);
    map.getTimetables().add(timetable1);
   
    assertEquals(1, map.searchSchedule(line1, station1).size());
   
    Timetable timetable2 = new Timetable();
    Line line2 = new Line();
    Station station2 = new Station();
   
    timetable2.setLine(line2);
    timetable2.setStation(station2);
    map.getTimetables().add(timetable2);
   
    Timetable timetable3 = new Timetable();
    Line line3 = new Line();
    Station station3 = new Station();
   
    timetable3.setLine(line3);
    timetable3.setStation(station3);
    map.getTimetables().add(timetable3);
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.