我正在尝试在屏幕上为JavaFX项目绘制一些线条。我已经找到了有关如何使用Java代码执行此操作的文档,但是我需要在FXML文件中进行操作。我找不到有关在FXML中创建
startX,startY-起点坐标,endX,endY-终点坐标;笔触-线条颜色; strokeLineCap(BUTT,SQUARE,ROUND); strokeWidth-宽度线:
<Line startX="41.0" startY="56.0" endX="143.0" endY="56.0" layoutX="67.0"
layoutY="154.0" opacity="0.5" stroke="#346e3c" strokeLineCap="BUTT" strokeWidth="4.0"/>
光标和效果属性:
<Line ...>
<cursor>
<Cursor fx:constant="HAND" />
</cursor>
<effect>
<GaussianBlur />
<!-- other, such as: Blend, Bloom, Glow, Reflection, Shadow -->
</effect>
</Line>