Package org.apache.flex.forks.batik.ext.awt

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


  // as a single color using the color and opacity of the last gradient
  // stop.
        if (p1.getX() == p2.getX() && p1.getY() == p2.getY()) {
            return colors[colors.length-1];
  } else {
      return new LinearGradientPaint(p1,
             p2,
             offsets,
             colors,
             spreadMethod,
             colorSpace,
View Full Code Here


        fs.gradient.records[0] = new GradRecord(0, SwfUtils.colorToInt(gp.getColor1())); //from left
        fs.gradient.records[1] = new GradRecord(255,  SwfUtils.colorToInt(gp.getColor2())); //to right
      }
      else if (paint instanceof LinearGradientPaint)
      {
        LinearGradientPaint lgp = (LinearGradientPaint)paint;
                Point2D start = lgp.getStartPoint();
        Point2D end = lgp.getEndPoint();

        AffineTransform gt = objectBoundingBoxTransform(start, end, width, height, width, height);

        fs = new FillStyle();
        fs.matrix = MatrixBuilder.build(gt);

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

        if (colors.length == 0 || colors.length != ratios.length) //Invalid fill so we skip
        {
          return null;
        }
View Full Code Here

        // as a single color using the color and opacity of the last gradient
        // stop.
        if (p1.getX() == p2.getX() && p1.getY() == p2.getY()) {
            return colors[colors.length-1];
        } else {
            return new LinearGradientPaint(p1,
                                           p2,
                                           offsets,
                                           colors,
                                           spreadMethod,
                                           colorSpace,
View Full Code Here

TOP

Related Classes of org.apache.flex.forks.batik.ext.awt.LinearGradientPaint

Copyright © 2018 www.massapicom. 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.