当前位置: 首页>>代码示例>>Java>>正文


Java SVGPath.setStroke方法代码示例

本文整理汇总了Java中javafx.scene.shape.SVGPath.setStroke方法的典型用法代码示例。如果您正苦于以下问题:Java SVGPath.setStroke方法的具体用法?Java SVGPath.setStroke怎么用?Java SVGPath.setStroke使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.shape.SVGPath的用法示例。


在下文中一共展示了SVGPath.setStroke方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawNode

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
@Override
        public Node drawNode() {
            currentTestNode = this;
            PathTransition pathTransition = new PathTransition();
            Pane p = pre(pathTransition);

            SVGPath path = new SVGPath();
            path.setContent("M40,60 C42,148 144,30 25,32");
            path.setStrokeWidth(2);
            path.setStroke(Color.RED);
            p.getChildren().add(path);
            path.setFill(Color.TRANSPARENT);

//            pathTransition.setDuration(Duration.valueOf(typicalDuration));
            pathTransition.setDuration(new Duration(typicalDuration));
            pathTransition.setNode(circle);
            circle.setRotate(30);
            //pathTransition.setPath(AnimationPath.createFromPath(path));
            pathTransition.setPath(path);
            pathTransition.setOrientation(OrientationType.NONE);

            timeline.setCycleCount(3);
            timeline.setAutoReverse(true);
            return p;
        }
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:26,代码来源:AnimationTransitionApp.java

示例2: lines

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
private SVGPath lines(int size) {
	SVGPath path = new SVGPath();
	path.setFill(Color.ALICEBLUE);
	path.setStroke(Color.BLUE);
	path.setContent("M0," + size + "L" + size / 2 + ",0 " + size + "," + size + " " + size / 2 + "," + 2 * size / 3 + "z");
	return path;
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:8,代码来源:SVGIcons.java

示例3: curve

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
private SVGPath curve(int size) {
	SVGPath path = new SVGPath();
	path.setFill(Color.HONEYDEW);
	path.setStroke(Color.GREEN);
	path.setContent("M0,0Q" + size + ",0," + size + "," + size + "L0," + size + "z");
	return path;
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:8,代码来源:SVGIcons.java

示例4: arc

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
private SVGPath arc(int size) {
	SVGPath path = new SVGPath();
	path.setFill(Color.MISTYROSE);
	path.setStroke(Color.RED);
	path.setContent("M0,0A" + size / 2 + "," + size + ",0,1,0," + size + ",0z");
	return path;
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:8,代码来源:SVGIcons.java

示例5: Guanine

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath Guanine() {
	
	SVGPath svg = new SVGPath();	
	svg.setContent("M 6906.7773 0 C 4609.2557 0 2881.4221 720.33224 1723.2773 2160.998 C 574.4254 3592.2617 0 5748.5499 0 8629.8633 L 0 12669.387 C 28.24299 15362.401 673.27571 17448.073 1935.0996 18926.402 C 3206.2164 20395.311 4952.91 21129.766 7175.1777 21129.766 C 9679.8754 21129.766 11581.904 20371.768 12881.264 18855.775 L 13333.334 18290.797 L 13333.334 10607.246 L 6991.5059 10607.246 L 6991.5059 12810.637 L 10748.553 12810.637 L 10748.553 17556.334 L 10367.273 17909.463 C 9642.2486 18587.422 8582.9544 18926.402 7189.3906 18926.402 C 5710.9157 18926.402 4576.2764 18375.555 3785.4727 17273.859 C 2994.4867 16162.762 2598.9922 14571.442 2598.9922 12499.9 L 2598.9922 8305.0234 C 2627.2352 6186.3983 2985.0115 4646.8638 3672.3184 3686.4199 C 4359.8074 2716.5557 5442.6975 2231.625 6920.9902 2231.625 C 8154.3889 2231.625 9072.4684 2594.1464 9675.2285 3319.1895 C 10286.917 4034.8122 10644.691 5032.9179 10748.553 6313.5098 L 13333.334 6313.5098 C 13220.362 4289.0523 12608.308 2730.687 11497.174 1638.4121 C 10395.515 546.13725 8865.3831 0 6906.7773 0 z ");
	svg.setStroke(AptaColors.Nucleotides.GUANINE);
	svg.setFill(AptaColors.Nucleotides.GUANINE);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:11,代码来源:SvgAlphabet.java

示例6: Thymine

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath Thymine() {
	
	SVGPath svg = new SVGPath();	
	svg.setContent("M 0 0 L 0 2222.2227 L 5372.7207 2222.2227 L 5372.7207 20478.223 L 7946.541 20478.223 L 7946.541 2222.2227 L 13333.334 2222.2227 L 13333.334 0 L 0 0 z ");
	svg.setStroke(AptaColors.Nucleotides.THYMINE);
	svg.setFill(AptaColors.Nucleotides.THYMINE);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:11,代码来源:SvgAlphabet.java

示例7: Uracil

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath Uracil() {
	
	SVGPath svg = new SVGPath();	
	svg.setContent("M 0 0 L 0 15419.127 C 19.795796 17524.669 595.7958 19148.522 1728 20290.682 C 2860.2042 21422.905 4499.0273 21989.016 6644.4688 21989.016 C 8739.9402 21989.016 10373.67 21408.009 11545.658 20245.996 C 12718.223 19083.964 13314.115 17475.007 13333.334 15419.127 L 13333.334 0 L 10592.289 0 L 10592.289 15314.854 C 10592.289 16774.822 10279.399 17867.32 9653.6211 18592.346 C 9037.8373 19307.435 8034.7871 19664.98 6644.4688 19664.98 C 5263.9522 19664.98 4260.8051 19307.435 3635.0273 18592.346 C 3019.2436 17867.32 2711.3516 16774.822 2711.3516 15314.854 L 2711.3516 0 L 0 0 z ");
	svg.setStroke(AptaColors.Nucleotides.URACIL);
	svg.setFill(AptaColors.Nucleotides.URACIL);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:11,代码来源:SvgAlphabet.java

示例8: N

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath N() {
	
	SVGPath svg = new SVGPath();	
	svg.setContent("M 0 0 L 0 20413.723 L 2579.9004 20413.723 L 2579.9004 4682.8105 L 10753.703 20413.723 L 13333.334 20413.723 L 13333.334 0 L 10781.648 0 L 10781.648 15801.02 L 2579.9004 0 L 0 0 z ");
	svg.setStroke(AptaColors.Nucleotides.PRIMERS);
	svg.setFill(AptaColors.Nucleotides.PRIMERS);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:11,代码来源:SvgAlphabet.java

示例9: Hairpin

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath Hairpin() {
	
	SVGPath svg = new SVGPath();
	svg.setContent("M 0 0 L 0 20370.613 L 2560.375 20370.613 L 2560.375 10954.787 L 10759.15 10954.787 L 10759.15 20370.613 L 13333.334 20370.613 L 13333.334 0 L 10759.15 0 L 10759.15 8758.2305 L 2560.375 8758.2305 L 2560.375 0 L 0 0 z ");
	svg.setStroke(AptaColors.Contexts.HAIRPIN);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:10,代码来源:SvgAlphabet.java

示例10: InnerLoop

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath InnerLoop() {
	
	SVGPath svg = new SVGPath();
	svg.setContent("M 0 0 L 0 2222.2266 L 5372.7207 2222.2266 L 5372.7207 18256 L 0.001953125 18256 L 0.001953125 20478.225 L 5372.7207 20478.225 L 7946.5684 20478.225 L 13333.336 20478.225 L 13333.336 18256 L 7946.5703 18256 L 7946.5703 2222.2266 L 13333.334 2222.2266 L 13333.334 0 L 7946.5703 0 L 5372.7246 0 L 0 0 z ");
	svg.setStroke(AptaColors.Contexts.INNERLOOP);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:10,代码来源:SvgAlphabet.java

示例11: BulgeLoop

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath BulgeLoop() {
	
	SVGPath svg = new SVGPath();
	svg.setContent("M 0 0 L 0 23028.992 L 6785.2695 23028.992 C 8883.6864 23028.992 10496.982 22438.501 11625.156 21257.52 C 12763.941 20076.558 13333.334 18452.724 13333.334 16386.016 C 13333.334 15004.701 13022.264 13823.73 12400.125 12843.102 C 11788.597 11862.473 10955.679 11213.992 9901.3691 10897.658 C 10818.559 10444.246 11546.088 9806.3037 12083.955 8983.832 C 12621.618 8161.3808 12890.449 7212.3898 12890.449 6136.8594 C 12890.449 4091.2294 12357.99 2557.0118 11293.07 1534.207 C 10238.557 511.40225 8662.1933 0 6563.9805 0 L 0 0 z M 2894.5059 2499.0312 L 6563.9805 2499.0312 C 7713.3759 2499.0313 8567.4137 2789.0036 9126.0938 3368.9453 C 9684.9778 3938.3378 9964.4199 4855.7004 9964.4199 6121.0352 C 9964.4199 7238.7421 9653.3495 8135.0175 9031.2109 8809.8613 C 8419.6828 9484.7052 7613.0874 9822.127 6611.4219 9822.127 L 2894.5059 9822.127 L 2894.5059 2499.0312 z M 2894.5059 12257.863 L 6911.9824 12257.863 C 9252.8068 12257.863 10423.219 13644.454 10423.219 16417.633 C 10423.219 17725.144 10101.642 18742.684 9458.4863 19470.254 C 8815.1269 20187.274 7945.1723 20545.785 6848.625 20545.785 L 2894.5059 20545.785 L 2894.5059 12257.863 z ");
	svg.setStroke(AptaColors.Contexts.BULGELOOP);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:10,代码来源:SvgAlphabet.java

示例12: MultipleLoop

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath MultipleLoop() {
	
	SVGPath svg = new SVGPath();
	svg.setContent("M 0 0 L 0 15758.412 L 1980.668 15758.412 L 1980.668 9621.7324 L 1796.3613 3517.5137 L 5898.2344 15758.412 L 7413.5273 15758.412 L 11536.971 3474.2227 L 11352.664 9621.7324 L 11352.664 15758.412 L 13333.334 15758.412 L 13333.334 0 L 10779.01 0 L 6666.248 12857.822 L 2553.4863 0 L 0 0 z ");
	svg.setStroke(AptaColors.Contexts.MULTIPLELOOP);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:10,代码来源:SvgAlphabet.java

示例13: DanglingEnd

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath DanglingEnd() {
	
	SVGPath svg = new SVGPath();
	svg.setContent("M 0 0 L 0 21960.773 L 4916.8887 21960.773 C 7651.9314 21960.773 9738.4326 21171.432 11176.393 19592.75 C 12614.353 18004.009 13333.334 15756.647 13333.334 12850.664 L 13333.334 9170.4102 C 13333.334 6264.4467 12624.375 4012.0651 11206.457 2413.2637 C 9788.7335 804.42187 7797.8686 0 5233.8633 0 L 0 0 z M 2760.2402 2383.1133 L 5233.8633 2383.1133 C 7033.7456 2383.1133 8376.0683 2926.0933 9260.832 4012.0547 C 10155.714 5087.9757 10603.154 6782.2973 10603.154 9095.0195 L 10603.154 12986.414 C 10583.112 15168.416 10125.652 16817.488 9230.7695 17933.629 C 8335.8875 19039.71 6918.0662 19592.75 4977.3066 19592.75 L 2760.2402 19592.75 L 2760.2402 2383.1133 z ");
	svg.setStroke(AptaColors.Contexts.DANGLINGEND);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:10,代码来源:SvgAlphabet.java

示例14: Paired

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
public final static SVGPath Paired() {
	
	SVGPath svg = new SVGPath();
	svg.setContent("M 0 0 L 0 21594.42 L 2714.1953 21594.42 L 2714.1953 13140.553 L 7074.6426 13140.553 C 9062.0479 13101.004 10599.527 12522.585 11687.08 11405.299 C 12784.582 10278.12 13333.334 8676.3331 13333.334 6599.9375 C 13333.334 4602.6593 12759.9 3005.8199 11613.033 1809.416 C 10465.975 603.13925 8888.8883 0 6881.7754 0 L 0 0 z M 2714.1953 2343.3574 L 6896.4141 2343.3574 C 8053.4218 2343.3574 8963.1266 2733.9121 9625.5312 3515.0215 C 10287.936 4296.15 10619.139 5334.3482 10619.139 6629.6152 C 10619.139 7974.3235 10297.791 9007.5656 9655.0938 9729.3418 C 9012.3967 10451.137 8087.9565 10812.033 6881.7754 10812.033 L 2714.1953 10812.033 L 2714.1953 2343.3574 z ");
	svg.setStroke(AptaColors.Contexts.PAIRED);
	svg.setStrokeWidth(0);
	return svg;
	
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:10,代码来源:SvgAlphabet.java

示例15: Draw

import javafx.scene.shape.SVGPath; //导入方法依赖的package包/类
@Override
public void Draw(Pane canvas)
{
	try
	{
		double xGridSize = canvas.getWidth() / MaximumX;
		double yGridSize = canvas.getHeight() / MaximumY;
		
		double x = GetDoubleAttribute("X");
		double y = GetDoubleAttribute("Y");
		
		Vector finalCenterPoint = new Vector(x * xGridSize, y * yGridSize);
		double scaleFactor = ScaleFactor(canvas.getWidth(), canvas.getHeight());
		
		SVGPath path = new SVGPath();
		path.setContent(_path);
		path.setFill(GetColorAttribute("Color"));
		path.setStroke(GetColorAttribute("StrokeColor"));
		path.setStrokeWidth(StrokeThickness(canvas.getWidth(), canvas.getHeight()));
		path.setStrokeLineJoin(GetBooleanAttribute("StrokeCurved")
			? StrokeLineJoin.ROUND
			: StrokeLineJoin.MITER);
		
		Rotate rotate = new Rotate();
		rotate.setAngle(GetDoubleAttribute("Rotation") / MaximumX * 360);
		rotate.setPivotX(0);
		rotate.setPivotY(0);
		
		Translate translate = new Translate();
		translate.setX(finalCenterPoint.X);
		translate.setY(finalCenterPoint.Y);
		
		Scale scale = new Scale();
		scale.setX(scaleFactor);
		scale.setY(scaleFactor);
		scale.setPivotX(0);
		scale.setPivotY(0);
		
		path.getTransforms().add(translate);
		path.getTransforms().add(scale);
		path.getTransforms().add(rotate);
		
		canvas.getChildren().add(path);
	}
	catch (Exception e)
	{
		// Show alert
	}
}
 
开发者ID:andrewsarnold,项目名称:FlagMaker-2,代码行数:50,代码来源:OverlayPath.java


注:本文中的javafx.scene.shape.SVGPath.setStroke方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。