-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
None
-
French Windows XP Pro SP3, Java 1.6.0_13, JavaFX 1.2 (standard)
CAG operations, like ShapeSubtract and ShapeIntersect, doesn't respect binding: they seem to be done at creation time and doesn't change afterward.
Simple demonstration:
var circle1 = Circle
{
centerX: 100
centerY: 100
radius: 50
}
var ellipse1 = Ellipse
{
centerX: 100
centerY: 130
radiusX: 30
radiusY: bind tradius + 10
}
var circle2 = Circle
{
centerX: 200
centerY: 100
radius: 50
}
var ellipse2 = Ellipse
{
centerX: 200
centerY: 130
radiusX: 30
radiusY: bind tradius + 10
}
var ellipse3 = Ellipse
{
centerX: 300
centerY: 130
radiusX: 30
radiusY: bind tradius + 10
fill: Color.LIGHTBLUE
}
// ShapeSubstract doesn't follow binding
var shapeS = ShapeSubtract
{
a: circle1
b: ellipse1
fill: Color.LIGHTGREEN
}
var shapeI = ShapeIntersect
{
a: circle2
b: ellipse2
fill: Color.LIGHTGREEN
}
def BASE_SIZE = 300;
def MARGIN = BASE_SIZE / 30;
def RADIUS = BASE_SIZE / 2 - MARGIN * 4;
var a = 0;
Stage
{
title: "ShapeXxx Test"
visible: true
scene: Scene
{
width: BASE_SIZE * 1.618
height: BASE_SIZE
fill: Color.web('#00BABE')
content:
[
shapeS,
shapeI,
ellipse3
]
}
}
var tradius;
var animation = Timeline
{
keyFrames:
[
KeyFrame
{
time: 0s
values: tradius => 10
}
KeyFrame
{
time: 10s
values: tradius => 100
}
]
};
animation.play();
Simple demonstration:
var circle1 = Circle
{
centerX: 100
centerY: 100
radius: 50
}
var ellipse1 = Ellipse
{
centerX: 100
centerY: 130
radiusX: 30
radiusY: bind tradius + 10
}
var circle2 = Circle
{
centerX: 200
centerY: 100
radius: 50
}
var ellipse2 = Ellipse
{
centerX: 200
centerY: 130
radiusX: 30
radiusY: bind tradius + 10
}
var ellipse3 = Ellipse
{
centerX: 300
centerY: 130
radiusX: 30
radiusY: bind tradius + 10
fill: Color.LIGHTBLUE
}
// ShapeSubstract doesn't follow binding
var shapeS = ShapeSubtract
{
a: circle1
b: ellipse1
fill: Color.LIGHTGREEN
}
var shapeI = ShapeIntersect
{
a: circle2
b: ellipse2
fill: Color.LIGHTGREEN
}
def BASE_SIZE = 300;
def MARGIN = BASE_SIZE / 30;
def RADIUS = BASE_SIZE / 2 - MARGIN * 4;
var a = 0;
Stage
{
title: "ShapeXxx Test"
visible: true
scene: Scene
{
width: BASE_SIZE * 1.618
height: BASE_SIZE
fill: Color.web('#00BABE')
content:
[
shapeS,
shapeI,
ellipse3
]
}
}
var tradius;
var animation = Timeline
{
keyFrames:
[
KeyFrame
{
time: 0s
values: tradius => 10
}
KeyFrame
{
time: 10s
values: tradius => 100
}
]
};
animation.play();
- duplicates
-
JDK-8106012 ShapeSubtract does not respond properly to changes in its member variables
- Closed