javafx.scene.transform.Shear Java Examples
The following examples show how to use
javafx.scene.transform.Shear.
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: ShearSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public ShearSample() { super(125,160); //create rectangle Rectangle rect = new Rectangle(75, 75, Color.web("#ed4b00", 0.5)); rect.setTranslateY(50); Shear shear = new Shear(0.7, 0); rect.getTransforms().add(shear); //show the rectangles getChildren().addAll(rect); // REMOVE ME setControls( new SimplePropertySheet.PropDesc("Shear X", shear.xProperty(), 0d, 1d), new SimplePropertySheet.PropDesc("Shear Y", shear.yProperty(), 0d, 1d), new SimplePropertySheet.PropDesc("Shear Pivot X", shear.pivotXProperty(), 0d, 50d), new SimplePropertySheet.PropDesc("Shear Pivot Y", shear.pivotYProperty(), 0d, 50d) ); // END REMOVE ME }
Example #2
Source File: ShearSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public static Node createIconContent() { final Rectangle r1 = new Rectangle (22, 0, 64, 64); r1.setArcHeight(4); r1.setArcWidth(4); r1.setFill(Color.web("#ed4b00",0.5)); r1.getTransforms().add(new Shear(-0.35, 0)); Polygon polygon = createArrow(); polygon.setLayoutX(-5); polygon.setLayoutY(-2); polygon.setRotate(90); Rectangle r2 = new Rectangle (0, 0, 64, 64); r2.setArcHeight(4); r2.setArcWidth(4); r2.setFill(Color.web("#ed4b00", 0.25)); javafx.scene.Group g = new javafx.scene.Group(r2,r1, polygon); return new javafx.scene.Group(g); }
Example #3
Source File: ShearSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public ShearSample() { super(125,160); //create rectangle Rectangle rect = new Rectangle(75, 75, Color.web("#ed4b00", 0.5)); rect.setTranslateY(50); Shear shear = new Shear(0.7, 0); rect.getTransforms().add(shear); //show the rectangles getChildren().addAll(rect); // REMOVE ME setControls( new SimplePropertySheet.PropDesc("Shear X", shear.xProperty(), 0d, 1d), new SimplePropertySheet.PropDesc("Shear Y", shear.yProperty(), 0d, 1d), new SimplePropertySheet.PropDesc("Shear Pivot X", shear.pivotXProperty(), 0d, 50d), new SimplePropertySheet.PropDesc("Shear Pivot Y", shear.pivotYProperty(), 0d, 50d) ); // END REMOVE ME }
Example #4
Source File: ShearSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public static Node createIconContent() { final Rectangle r1 = new Rectangle (22, 0, 64, 64); r1.setArcHeight(4); r1.setArcWidth(4); r1.setFill(Color.web("#ed4b00",0.5)); r1.getTransforms().add(new Shear(-0.35, 0)); Polygon polygon = createArrow(); polygon.setLayoutX(-5); polygon.setLayoutY(-2); polygon.setRotate(90); Rectangle r2 = new Rectangle (0, 0, 64, 64); r2.setArcHeight(4); r2.setArcWidth(4); r2.setFill(Color.web("#ed4b00", 0.25)); javafx.scene.Group g = new javafx.scene.Group(r2,r1, polygon); return new javafx.scene.Group(g); }
Example #5
Source File: LightSpeedOut.java From AnimateFX with Apache License 2.0 | 6 votes |
@Override void initTimeline() { shear = new Shear(); getNode().getTransforms().add(shear); setTimeline(new Timeline( new KeyFrame(Duration.millis(0), new KeyValue(shear.xProperty(), 0), new KeyValue(shear.yProperty(), 0), new KeyValue(getNode().opacityProperty(), 1, Interpolator.EASE_IN) ), new KeyFrame(Duration.millis(1000), new KeyValue(getNode().translateXProperty(), getNode().getBoundsInParent().getWidth(), Interpolator.EASE_IN), new KeyValue(shear.xProperty(), 0.30), new KeyValue(shear.yProperty(), 0), new KeyValue(getNode().opacityProperty(), 0, Interpolator.EASE_IN) ) )); }
Example #6
Source File: DigitalClock.java From marathonv5 with Apache License 2.0 | 5 votes |
public Digit(Color onColor, Color offColor, Effect onEffect, Effect offEffect) { this.onColor = onColor; this.offColor = offColor; this.onEffect = onEffect; this.offEffect = offEffect; getChildren().addAll(polygons); getTransforms().add(new Shear(-0.1,0)); showNumber(0); }
Example #7
Source File: DigitalClock.java From marathonv5 with Apache License 2.0 | 5 votes |
public Digit(Color onColor, Color offColor, Effect onEffect, Effect offEffect) { this.onColor = onColor; this.offColor = offColor; this.onEffect = onEffect; this.offEffect = offEffect; getChildren().addAll(polygons); getTransforms().add(new Shear(-0.1,0)); showNumber(0); }
Example #8
Source File: LightSpeedIn.java From AnimateFX with Apache License 2.0 | 5 votes |
@Override void initTimeline() { Shear shear = new Shear(); getNode().getTransforms().add(shear); setTimeline(new Timeline( new KeyFrame(Duration.millis(0), new KeyValue(getNode().translateXProperty(), getNode().getBoundsInParent().getWidth(), Interpolator.EASE_OUT), new KeyValue(shear.xProperty(), -0.30), new KeyValue(shear.yProperty(), 0), new KeyValue(getNode().opacityProperty(), 0, Interpolator.EASE_OUT) ), new KeyFrame(Duration.millis(600), new KeyValue(getNode().translateXProperty(), 0, Interpolator.EASE_OUT), new KeyValue(shear.xProperty(), 0.20), new KeyValue(shear.yProperty(), 0), new KeyValue(getNode().opacityProperty(), 1, Interpolator.EASE_OUT) ), new KeyFrame(Duration.millis(800), new KeyValue(shear.xProperty(), -0.5), new KeyValue(shear.yProperty(), 0), new KeyValue(getNode().opacityProperty(), 1, Interpolator.EASE_OUT) ), new KeyFrame(Duration.millis(1000), new KeyValue(shear.xProperty(), 0), new KeyValue(shear.yProperty(), 0), new KeyValue(getNode().opacityProperty(), 1, Interpolator.EASE_OUT) ))); }
Example #9
Source File: Jello.java From AnimateFX with Apache License 2.0 | 5 votes |
@Override void initTimeline() { Shear shear = new Shear(); Bounds bounds = getNode().getLayoutBounds(); shear.setPivotX(bounds.getWidth() / 2); shear.setPivotY(bounds.getHeight() / 2); getNode().getTransforms().add(shear); setTimeline(new Timeline( new KeyFrame(Duration.millis(0), new KeyValue(shear.xProperty(), 0), new KeyValue(shear.yProperty(), 0)), new KeyFrame(Duration.millis(111), new KeyValue(shear.xProperty(), 0.125), new KeyValue(shear.yProperty(), 0.125)), new KeyFrame(Duration.millis(222), new KeyValue(shear.xProperty(), -0.625), new KeyValue(shear.yProperty(), -0.625)), new KeyFrame(Duration.millis(333), new KeyValue(shear.xProperty(), 0.3125), new KeyValue(shear.yProperty(), 0.3125)), new KeyFrame(Duration.millis(444), new KeyValue(shear.xProperty(), -0.15625), new KeyValue(shear.yProperty(), -0.15625)), new KeyFrame(Duration.millis(555), new KeyValue(shear.xProperty(), 0.078125), new KeyValue(shear.yProperty(), 0.078125)), new KeyFrame(Duration.millis(666), new KeyValue(shear.xProperty(), -0.0390625), new KeyValue(shear.yProperty(), -0.0390625)), new KeyFrame(Duration.millis(777), new KeyValue(shear.xProperty(), 0.01953125), new KeyValue(shear.yProperty(), 0.01953125)), new KeyFrame(Duration.millis(888), new KeyValue(shear.xProperty(), 0), new KeyValue(shear.yProperty(), 0)))); }
Example #10
Source File: DigitalClock.java From netbeans with Apache License 2.0 | 5 votes |
public Digit(Color onColor, Color offColor, Effect onEffect, Effect offEffect) { this.onColor = onColor; this.offColor = offColor; this.onEffect = onEffect; this.offEffect = offEffect; getChildren().addAll(polygons); getTransforms().add(new Shear(-0.1,0)); showNumber(0); }