2008年12月17日水曜日

JavaFX Shape (scene)

ARC 弧

import javafx.scene.shape.*;

var arc = ARC {
centerX: 30
centerY: 50
radiusX: 25,
radiusY: 25,
startAngle: 45
length: 270
type: ArcType.ROUND
stroke: Color.DARKSLATEGRAY
fill: null
};

Path 経路

var path = Path {
stroke: Color.DARKSLATEGRAY
elements: [
MoveTo {
x: 100
y: 30
},
ArcTo {
x: 150
y: 50
radiusX: 40
radiusY: 20
},
LineTo{
x: 100
y: 30
}
]
};

Circle 円

var circle = Circle {
centerX: 0
centerY: 50
radius: 20
stroke: Color.DARKSLATEGRAY
fill: null
};

Cubic Curve Cubic曲線

var cubiccurve = CubicCurve {
startX: 80
startY: 50
controlX1: 105
controlY1: 0
controlX2: 155
controlY2: 100
endX: 200
endY: 50
stroke: Color.DARKSLATEGRAY
fill: null
};

Ellipse 楕円

var ellipse = Ellipse {
centerX: 140
centerY: 50
radiusX: 50
radiusY: 25
stroke: Color.DARKSLATEGRAY
fill: null
};

Line 直線

var line = Line {
startX: 100
startY: 30
endX: 140
endY: 70
stroke: Color.DARKSLATEGRAY
};

Polygon 多角形

var polygon = Polygon {
fill: null
stroke: Color.DARKSLATEGRAY
points: [
20.0,30.0,
80.0,50.0,
70.0,70.0
]
};

Polyline 折れ曲がり直線

var polyline = Polyline {
fill: null
stroke: Color.DARKSLATEGRAY
points: [
50.0,30.0,
70.0,40.0,
60.0, 60.0,
90.0, 50.0
]
};

QuadCurve Quad曲線

var quadcurve = QuadCurve {
fill: null
startX: 80.0
startY: 50.0
endX: 120.0
endY: 50.0
controlX: 110.0
controlY: 15.0
stroke: Color.DARKSLATEGRAY
};

Rectangle 四角

var rectangle = Rectangle {
fill: null
x: 110
y: 20
width: 100
height: 50
arcWidth: 20
arcHeight: 20
stroke: Color.DARKSLATEGRAY
};

SVGPath

var svgpath = SVGPath {
content:"M20,30 L40,50 L60,30 L80,55 L100,30"
fill: null
stroke: Color.DARKSLATEGRAY
translateX: 110
};


0 件のコメント:

コメントを投稿