99 assert(com.sun.javafx.geom.PathIterator.SEG_CLOSE == java.awt.geom.PathIterator.SEG_CLOSE);
100 }
101 static final LinearGradientPaint.CycleMethod LGP_CYCLE_METHODS[] = {
102 LinearGradientPaint.CycleMethod.NO_CYCLE,
103 LinearGradientPaint.CycleMethod.REFLECT,
104 LinearGradientPaint.CycleMethod.REPEAT,
105 };
106 static final RadialGradientPaint.CycleMethod RGP_CYCLE_METHODS[] = {
107 RadialGradientPaint.CycleMethod.NO_CYCLE,
108 RadialGradientPaint.CycleMethod.REFLECT,
109 RadialGradientPaint.CycleMethod.REPEAT,
110 };
111
112 private static final BasicStroke DEFAULT_STROKE =
113 new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f);
114 private static final Paint DEFAULT_PAINT = Color.WHITE;
115 static java.awt.geom.AffineTransform J2D_IDENTITY =
116 new java.awt.geom.AffineTransform();
117 private int clipRectIndex;
118 private boolean hasPreCullingBits = false;
119
120 static java.awt.Color toJ2DColor(Color c) {
121 return new java.awt.Color(c.getRed(),
122 c.getGreen(),
123 c.getBlue(),
124 c.getAlpha());
125 }
126
127 /*
128 * Ensure that no fractions are equal
129 *
130 * Note that the J2D objects reject equal fractions, but the FX versions
131 * allow them.
132 *
133 * The FX version treats values with equal fractions such that as you
134 * approach the fractional value from below it interpolates to the
135 * first color associated with that fraction and as you interpolate
136 * away from it from above it interpolates the last such color.
137 *
138 * To get the J2D version to exhibit the FX behavior we collapse all
1365 public void setRenderRoot(NodePath root) {
1366 this.renderRoot = root;
1367 }
1368
1369 @Override
1370 public NodePath getRenderRoot() {
1371 return renderRoot;
1372 }
1373
1374 public void setState3D(boolean flag) {
1375 }
1376
1377 public boolean isState3D() {
1378 return false;
1379 }
1380
1381 public void setup3DRendering() {
1382 }
1383
1384 @Override
1385 public void blit(RTTexture srcTex, RTTexture dstTex,
1386 int srcX0, int srcY0, int srcX1, int srcY1,
1387 int dstX0, int dstY0, int dstX1, int dstY1) {
1388 throw new UnsupportedOperationException("Not supported yet.");
1389 }
1390
1391 private static class AdaptorShape implements java.awt.Shape {
1392 private Shape prshape;
1393
1394 public void setShape(Shape prshape) {
1395 this.prshape = prshape;
1396 }
1397
1398 public boolean contains(double x, double y) {
1399 return prshape.contains((float) x, (float) y);
1400 }
1401
1402 public boolean contains(java.awt.geom.Point2D p) {
1403 return contains(p.getX(), p.getY());
1404 }
|
99 assert(com.sun.javafx.geom.PathIterator.SEG_CLOSE == java.awt.geom.PathIterator.SEG_CLOSE);
100 }
101 static final LinearGradientPaint.CycleMethod LGP_CYCLE_METHODS[] = {
102 LinearGradientPaint.CycleMethod.NO_CYCLE,
103 LinearGradientPaint.CycleMethod.REFLECT,
104 LinearGradientPaint.CycleMethod.REPEAT,
105 };
106 static final RadialGradientPaint.CycleMethod RGP_CYCLE_METHODS[] = {
107 RadialGradientPaint.CycleMethod.NO_CYCLE,
108 RadialGradientPaint.CycleMethod.REFLECT,
109 RadialGradientPaint.CycleMethod.REPEAT,
110 };
111
112 private static final BasicStroke DEFAULT_STROKE =
113 new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f);
114 private static final Paint DEFAULT_PAINT = Color.WHITE;
115 static java.awt.geom.AffineTransform J2D_IDENTITY =
116 new java.awt.geom.AffineTransform();
117 private int clipRectIndex;
118 private boolean hasPreCullingBits = false;
119 private float pixelScale = 1.0f;
120
121 static java.awt.Color toJ2DColor(Color c) {
122 return new java.awt.Color(c.getRed(),
123 c.getGreen(),
124 c.getBlue(),
125 c.getAlpha());
126 }
127
128 /*
129 * Ensure that no fractions are equal
130 *
131 * Note that the J2D objects reject equal fractions, but the FX versions
132 * allow them.
133 *
134 * The FX version treats values with equal fractions such that as you
135 * approach the fractional value from below it interpolates to the
136 * first color associated with that fraction and as you interpolate
137 * away from it from above it interpolates the last such color.
138 *
139 * To get the J2D version to exhibit the FX behavior we collapse all
1366 public void setRenderRoot(NodePath root) {
1367 this.renderRoot = root;
1368 }
1369
1370 @Override
1371 public NodePath getRenderRoot() {
1372 return renderRoot;
1373 }
1374
1375 public void setState3D(boolean flag) {
1376 }
1377
1378 public boolean isState3D() {
1379 return false;
1380 }
1381
1382 public void setup3DRendering() {
1383 }
1384
1385 @Override
1386 public void setPixelScaleFactor(float pixelScale) {
1387 this.pixelScale = pixelScale;
1388 }
1389
1390 @Override
1391 public float getPixelScaleFactor() {
1392 return pixelScale;
1393 }
1394
1395 @Override
1396 public void blit(RTTexture srcTex, RTTexture dstTex,
1397 int srcX0, int srcY0, int srcX1, int srcY1,
1398 int dstX0, int dstY0, int dstX1, int dstY1) {
1399 throw new UnsupportedOperationException("Not supported yet.");
1400 }
1401
1402 private static class AdaptorShape implements java.awt.Shape {
1403 private Shape prshape;
1404
1405 public void setShape(Shape prshape) {
1406 this.prshape = prshape;
1407 }
1408
1409 public boolean contains(double x, double y) {
1410 return prshape.contains((float) x, (float) y);
1411 }
1412
1413 public boolean contains(java.awt.geom.Point2D p) {
1414 return contains(p.getX(), p.getY());
1415 }
|