本文整理了Java中ij.gui.Line.<init>()
方法的一些代码示例,展示了Line.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Line.<init>()
方法的具体详情如下:
包路径:ij.gui.Line
类名称:Line
方法名:<init>
[英]Creates a new straight line selection using the specified starting and ending offscreen double coordinates.
[中]使用指定的开始和结束屏幕外双坐标创建新的直线选择。
代码示例来源:origin: stackoverflow.com
var line1 = new Line(0, 0, 0, 100);
var line2 = new Line(0, 100, 100, 100);
var line3 = new Line(100, 100, 100, 0);
var line4 = new Line(100, 0, 0, 0);
代码示例来源:origin: stackoverflow.com
target.addCellParent(source);
line = new Line();
代码示例来源:origin: stackoverflow.com
Line line1 = new Line(20, 40, 270, 40);
line1.getStrokeDashArray().addAll(25d, 20d, 5d, 20d);
Line line2 = new Line(20, 60, 270, 60);
line2.getStrokeDashArray().addAll(50d, 40d);
Line line3 = new Line(20, 80, 270, 80);
line3.getStrokeDashArray().addAll(25d, 10d);
Line line4 = new Line(20, 100, 270, 100);
line4.getStrokeDashArray().addAll(2d);
Line line5 = new Line(20, 120, 270, 120);
line5.getStrokeDashArray().addAll(2d, 21d);
pane.getChildren().addAll(line1, line2, line3, line4, line5);
代码示例来源:origin: stackoverflow.com
Line eastHorz = new Line();
eastHorz.SetVerts(10f, 10f, 0f, 10f, -10f, 0f);
eastHorz.SetColor(.8f, .8f, 0f, 1.0f);
Line northHorz = new Line();
northHorz.SetVerts(-10f, 10f, 0f, 10f, 10f, 0f);
northHorz.SetColor(0.8f, 0.8f, 0f, 1.0f);
Line westHorz = new Line();
westHorz.SetVerts(-10f, -10f, 0f, -10f, 10f, 0f);
westHorz.SetColor(0.8f, 0.8f, 0f, 1.0f);
Line southHorz = new Line();
southHorz.SetVerts(-10f, -10f, 0f, 10f, -10f, 0f);
southHorz.SetColor(0.8f, 0.8f, 0f, 1.0f);
Lines.add(eastHorz);
Lines.add(northHorz);
Lines.add(westHorz);
Lines.add(southHorz);
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) {
List<Line> list = new ArrayList<Line>();
Line line;
while (inputFile.hasNext())
{
String stuff = inputFile.nextLine();
line = new Line(stuff);
list.add(line);
}
}
代码示例来源:origin: stackoverflow.com
List<Line> lines = Arrays.asList(
new FirstLine("Every"), // note this class is different
new Line("word"),
new Line("on"),
new Line("separate"),
new Line("line") );
StringBuffer sb = new StringBuffer();
for (Line l : lines) {
// Again the decision is delegated. Data knows how to print itself
// Line would return: "\n" + s
// FirstLine would return: s
sb.append( l.getPrintVersion() );
}
代码示例来源:origin: stackoverflow.com
public void drawLine(Line ln) {
Line buf = new Line();
buf.begin = new Point(ln.begin); // I'm guessing the class name and available constructor
buf.end = new Point(ln.end); // I'm guessing the class name and available constructor
buf.begin = centerPoint(buf.begin);
buf.end = centerPoint(buf.end);
gfx.drawLine((int) buf.begin.x, (int) buf.begin.y, (int) buf.end.x, (int) buf.end.y);
}
代码示例来源:origin: stackoverflow.com
// build the composite
IComposite<IGraphic> myComposite = new Composite<IGraphic>(IGraphic.class);
myComposite.add(new Rectangle());
myComposite.add(new Line());
myComposite.add(new Line());
// use the composite, invokes the IGraphic#draw() in the
// underlying Rectangle and two Line instances
myComposite.getComponent().draw();
代码示例来源:origin: stackoverflow.com
private Line valueMarker = new Line();
private XYChart.Series<Number, Number> series = new XYChart.Series<>();
private NumberAxis yAxis;
代码示例来源:origin: net.imagej/imagej-legacy
private Roi createLineRoi(Overlay overlay, double[] p1, double[] p2) {
final double x1 = p1[0];
final double y1 = p1[1];
final double x2 = p2[0];
final double y2 = p2[1];
final Line line = new Line(x1, y1, x2, y2);
assignPropertiesToRoi(line, overlay);
return line;
}
代码示例来源:origin: stackoverflow.com
Line line3 = new Line(100, 10, 100, 100);
line3.setStrokeWidth(5);
line3.setStroke(Color.BLUE);
getChildren().add(line3); // <---you can remove this
Line line4 = new Line(10, 100, 100, 100);
line3.setStrokeWidth(5);
line3.setStroke(Color.DARKGREEN);
getChildren().add(line3);
代码示例来源:origin: stackoverflow.com
Line line = new Line(0,0,100,0);
line.setStrokeWidth(10);
line.setStroke(new LinearGradient(0d, -5d, 0d, 5d, false,
CycleMethod.NO_CYCLE, new Stop(0,Color.BLACK),
new Stop(0.199,Color.BLACK),
new Stop(0.2,Color.RED),
new Stop(0.799,Color.RED),
new Stop(0.8,Color.BLACK)));
代码示例来源:origin: stackoverflow.com
Line stroke = new Line(0, 0, 100, 100);
Line fill = new Line(0, 0, 100, 100);
stroke.setStrokeWidth(10);
fill.setStrokeWidth(8);
stroke.setStroke(Color.BLACK);
fill.setStroke(Color.RED);
pane.addAll(stroke, fill);
代码示例来源:origin: net.imagej/ij
/** Creates a straight line selection using floating point coordinates. */
public static void makeLine(double x1, double y1, double x2, double y2) {
getImage().setRoi(new Line(x1, y1, x2, y2));
}
代码示例来源:origin: net.imagej/ij
/** Creates a straight line selection. */
public static void makeLine(int x1, int y1, int x2, int y2) {
getImage().setRoi(new Line(x1, y1, x2, y2));
}
代码示例来源:origin: stackoverflow.com
Line vertLine = new Line();
vertLine.SetVerts(-0.5f, 0.5f, 0f, -0.5f, -0.5f, 0f);
vertLine.SetColor(.8f, .8f, 0f, 1.0f);
vertLine.draw(mMVPMatrix);
代码示例来源:origin: stackoverflow.com
@Override
public void start(Stage primaryStage) throws Exception {
Group group = new Group();
primaryStage.setScene(new Scene(group, 200, 350));
Line line = new Line(100, 50, 100, 300);
LinearGradient linearGradient = new LinearGradient(0d, 0d, 0d, 1d, true,
CycleMethod.NO_CYCLE, new Stop(0,Color.RED),new Stop(1,Color.GREEN));
line.setStrokeWidth(36); // 3em
line.setStroke(linearGradient);
group.getChildren().add(line);
primaryStage.show();
}
代码示例来源:origin: stackoverflow.com
final Line line = new Line();
@Override
public void initialize(URL arg0, ResourceBundle arg1)
{
// TODO Auto-generated method stub
line.setStartX(lblDragTest.getLayoutX());
line.setStartY(lblDragTest.getLayoutY());
line.setEndX(lblNew.getLayoutX());
line.setEndY(lblNew.getLayoutY());
rootAnchorPane.getChildren().add(line);
}
代码示例来源:origin: stackoverflow.com
Line line = new Line();
line.setStroke(Color.BLACK);
layout.setOnKeyPressed(e -> {
if (e.getCode() == KeyCode.UP) {
line.setStartX(line.getEndX() + 0);
line.setStartY(line.getEndY() + 15);
}
});
layout.getChildren().add(line);
layout.requestFocus();
代码示例来源:origin: net.imagej/imagej-legacy
@Override
public ij.gui.Line convert(final Line mask) {
final RealLocalizable ptOne = mask.endpointOne();
final RealLocalizable ptTwo = mask.endpointTwo();
return new ij.gui.Line(ptOne.getDoublePosition(0), ptOne.getDoublePosition(
1), ptTwo.getDoublePosition(0), ptTwo.getDoublePosition(1));
}
}
内容来源于网络,如有侵权,请联系作者删除!