2008年12月20日土曜日

JavaFX Compositions (scene)

2つの図形の組合せ

そのまま Original Shapes
  1. Group{  
  2.     content:[  
  3.         Rectangle {  
  4.             fill: null  
  5.             x: 80  
  6.             y: 120  
  7.             width: 100  
  8.             height: 50  
  9.             stroke: Color.RED  
  10.         },  
  11.         Ellipse {  
  12.             fill: null  
  13.             centerX: 110  
  14.             centerY: 150   
  15.             radiusX: 50  
  16.             radiusY: 25  
  17.             stroke: Color.RED  
  18.          }  
  19.     ]  
  20. }  


2つの図形の AND をとる Intersection
  1. ShapeIntersect {  
  2.     fill: fill  
  3.     a: Rectangle {  
  4.          x: 80  
  5.          y: 120  
  6.          width: 100  
  7.          height: 50 }  
  8.     b: Ellipse {  
  9.          centerX: 110  
  10.          centerY: 150  
  11.          radiusX: 50  
  12.          radiusY: 25}  
  13. }  


2つの図形の差をとる Subtraction
  1. ShapeSubtract {  
  2.     fill: fill  
  3.     a: Rectangle {  
  4.          x: 80   
  5.          y: 120   
  6.          width: 100  
  7.          height: 50 }  
  8.     b: Ellipse {  
  9.          centerX: 110  
  10.          centerY: 150  
  11.          radiusX: 50  
  12.          radiusY: 25}  
  13. }  

0 件のコメント:

コメントを投稿