Java Code Examples for javafx.scene.shape.ArcType#CHORD
The following examples show how to use
javafx.scene.shape.ArcType#CHORD .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FXGraphics2D.java From openstock with GNU General Public License v3.0 | 5 votes |
private ArcType intToArcType(int t) { if (t == Arc2D.CHORD) { return ArcType.CHORD; } else if (t == Arc2D.OPEN) { return ArcType.OPEN; } else if (t == Arc2D.PIE) { return ArcType.ROUND; } throw new IllegalArgumentException("Unrecognised t: " + t); }
Example 2
Source File: FXGraphics2D.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
private ArcType intToArcType(int t) { if (t == Arc2D.CHORD) { return ArcType.CHORD; } else if (t == Arc2D.OPEN) { return ArcType.OPEN; } else if (t == Arc2D.PIE) { return ArcType.ROUND; } throw new IllegalArgumentException("Unrecognised t: " + t); }
Example 3
Source File: FXGraphics2D.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
private ArcType intToArcType(int t) { if (t == Arc2D.CHORD) { return ArcType.CHORD; } else if (t == Arc2D.OPEN) { return ArcType.OPEN; } else if (t == Arc2D.PIE) { return ArcType.ROUND; } throw new IllegalArgumentException("Unrecognised t: " + t); }
Example 4
Source File: FXGraphics2D.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
private ArcType intToArcType(int t) { if (t == Arc2D.CHORD) { return ArcType.CHORD; } else if (t == Arc2D.OPEN) { return ArcType.OPEN; } else if (t == Arc2D.PIE) { return ArcType.ROUND; } throw new IllegalArgumentException("Unrecognised t: " + t); }
Example 5
Source File: ShapeConverter.java From Enzo with Apache License 2.0 | 5 votes |
public static String convertArc(final Arc ARC) { StringBuilder fxPath = new StringBuilder(); double centerX = ARC.getCenterX(); double centerY = ARC.getCenterY(); double radiusX = ARC.getRadiusX(); double radiusY = ARC.getRadiusY(); double startAngle = Math.toRadians(-ARC.getStartAngle()); double endAngle = Math.toRadians(-ARC.getStartAngle() - ARC.getLength()); double length = ARC.getLength(); double startX = radiusX * Math.cos(startAngle); double startY = radiusY * Math.sin(startAngle); double endX = centerX + radiusX * Math.cos(endAngle); double endY = centerY + radiusY * Math.sin(endAngle); int xAxisRot = 0; int largeArc = (length > 180) ? 1 : 0; int sweep = (length < 0) ? 1 : 0; fxPath.append("M ").append(centerX).append(" ").append(centerY).append(" "); if (ArcType.ROUND == ARC.getType()) { fxPath.append("l ").append(startX).append(" ").append(startY).append(" "); } fxPath.append("A ").append(radiusX).append(" ").append(radiusY).append(" ") .append(xAxisRot).append(" ").append(largeArc).append(" ").append(sweep).append(" ") .append(endX).append(" ").append(endY).append(" "); if (ArcType.CHORD == ARC.getType() || ArcType.ROUND == ARC.getType()) { fxPath.append("Z"); } return fxPath.toString(); }
Example 6
Source File: FXGraphics2D.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
private ArcType intToArcType(int t) { if (t == Arc2D.CHORD) { return ArcType.CHORD; } else if (t == Arc2D.OPEN) { return ArcType.OPEN; } else if (t == Arc2D.PIE) { return ArcType.ROUND; } throw new IllegalArgumentException("Unrecognised t: " + t); }
Example 7
Source File: FXGraphics2D.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
private ArcType intToArcType(int t) { if (t == Arc2D.CHORD) { return ArcType.CHORD; } else if (t == Arc2D.OPEN) { return ArcType.OPEN; } else if (t == Arc2D.PIE) { return ArcType.ROUND; } throw new IllegalArgumentException("Unrecognised t: " + t); }