Examples of RadialGradientPaint


Examples of org.apache.flex.forks.batik.ext.awt.RadialGradientPaint

        }
      }
      else if (paint instanceof RadialGradientPaint)
      {
        RadialGradientPaint rgp = (RadialGradientPaint)paint;

        //Note: Flash doesn't support the focal point of a radial gradient
        //Point2D cp = rgp.getCenterPoint();
        //Point2D fp = rgp.getFocusPoint();
        double diameter = rgp.getRadius() * 2.0;
        double outerX = diameter * rgp.getTransform().getScaleX();
        double outerY = diameter * rgp.getTransform().getScaleY();

        AffineTransform gt = objectBoundingBoxTransform(null, null, width, height, outerX, outerY);
        fs = new FillStyle();
        fs.matrix = MatrixBuilder.build(gt);

        fs.type = FillStyle.FILL_RADIAL_GRADIENT;

        Color[] colors = rgp.getColors();
        float[] ratios = rgp.getFractions();

                fs.gradient = new Gradient();
                fs.gradient.records = new GradRecord[ratios.length <= 8 ? ratios.length : 8];
        for (int i = 0; i < ratios.length && i < 8; i++)
        {
View Full Code Here

Examples of org.apache.flex.forks.batik.ext.awt.RadialGradientPaint

                                                  SVG_FY_ATTRIBUTE,
                                                  coordSystemType,
                                                  uctx);

            // <!> FIXME: colorSpace ignored for radial gradient at this time
            return new RadialGradientPaint(c,
                                           r,
                                           f,
                                           offsets,
                                           colors,
                                           spreadMethod,
View Full Code Here

Examples of org.openbp.swing.draw.RadialGradientPaint

        if (cyclic)
        {
          // Create a radial gradient
          Point2D radius = new Point2D.Double(p2.getX() - p1.getX(), p2.getY() - p1.getY());
          paint = new RadialGradientPaint(p1, c1, radius, c2);
        }
        else
        {
          // Create a linear gradient
          paint = new GradientPaint(p1, c1, p2, c2, true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.