Examples of LinearGradient


Examples of org.gephi.ui.utils.GradientUtils.LinearGradient

                        algorithm = new DijkstraShortestPathAlgorithm(graph, n);
                        algorithm.compute();
                    }

                    //Color
                    LinearGradient linearGradient = new LinearGradient(colors, positions);

                    //Algorithm


                    double maxDistance = algorithm.getMaxDistance();
                    if (!dontPaintUnreachable) {
                        maxDistance++;   //+1 to have the maxdistance nodes a ratio<1
                    }
                    if (maxDistance > 0) {
                        for (Entry<Node, Double> entry : algorithm.getDistances().entrySet()) {
                            Node node = entry.getKey();
                            if (!Double.isInfinite(entry.getValue())) {
                                float ratio = (float) (entry.getValue() / maxDistance);
                                Color c = linearGradient.getValue(ratio);
                                node.setColor(c);
                            } else if (!dontPaintUnreachable) {
                                Color c = colors[colors.length - 1];
                                node.setColor(c);
                            }
View Full Code Here

Examples of org.timepedia.chronoscope.client.render.LinearGradient

    }
    String[] pieces = afterUrl.split("/");
    String xy[] = pieces[0].split(",");
    String xy2[] = pieces[1].split(",");

    LinearGradient lingrad = layer.createLinearGradient(
        Double.parseDouble(xy[0]), Double.parseDouble(xy[1]),
        Double.parseDouble(xy2[0]), Double.parseDouble(xy2[1]));
    lingrad.addColorStop(Double.parseDouble(pieces[2]), "#" + pieces[3]);
    lingrad.addColorStop(Double.parseDouble(pieces[4]), "#" + pieces[5]);
    return lingrad;
  }
View Full Code Here

Examples of org.timepedia.chronoscope.client.render.LinearGradient

  public void closePath() {
  }

  public LinearGradient createLinearGradient(double startx, double starty,
      double endx, double endy) {
    return new LinearGradient() {

      public void addColorStop(double position, String color) {
      }
    };
  }
View Full Code Here

Examples of vash.operation.LinearGradient

  @Test public void testConstGreen()   { this.runTest("1102", c1N(), c1P(), c1N()); }
  @Test public void testConstBlue()   { this.runTest("1103", c1N(), c1N(), c1P()); }
  @Test public void testConstMagenta(){ this.runTest("1104", c1P(), c1N(), c1P()); }
 
  // linear gradient
  @Test public void testLinGradDiagLeftFill()  { this.runTest("2101", new LinearGradient(0, 0, 1, 1)); }
View Full Code Here

Examples of vash.operation.LinearGradient

  @Test public void testConstBlue()   { this.runTest("1103", c1N(), c1N(), c1P()); }
  @Test public void testConstMagenta(){ this.runTest("1104", c1P(), c1N(), c1P()); }
 
  // linear gradient
  @Test public void testLinGradDiagLeftFill()  { this.runTest("2101", new LinearGradient(0, 0, 1, 1)); }
  @Test public void testLinGradDiagRightFill() { this.runTest("2102", new LinearGradient(-1, -1, 0, 0)); }
View Full Code Here

Examples of vash.operation.LinearGradient

 
  // linear gradient
  @Test public void testLinGradDiagLeftFill()  { this.runTest("2101", new LinearGradient(0, 0, 1, 1)); }
  @Test public void testLinGradDiagRightFill() { this.runTest("2102", new LinearGradient(-1, -1, 0, 0)); }
  // Note: the rest of these codify existing, non-optimal behavior
  @Test public void testLinGradDiagNorthSouth(){ this.runTest("2103", new LinearGradient(0, -1, 0, 1)); }
View Full Code Here

Examples of vash.operation.LinearGradient

  // linear gradient
  @Test public void testLinGradDiagLeftFill()  { this.runTest("2101", new LinearGradient(0, 0, 1, 1)); }
  @Test public void testLinGradDiagRightFill() { this.runTest("2102", new LinearGradient(-1, -1, 0, 0)); }
  // Note: the rest of these codify existing, non-optimal behavior
  @Test public void testLinGradDiagNorthSouth(){ this.runTest("2103", new LinearGradient(0, -1, 0, 1)); }
  @Test public void testLinGradDiagSouthNorth(){ this.runTest("2104", new LinearGradient(0, 1, 0, -1)); }
View Full Code Here

Examples of vash.operation.LinearGradient

  @Test public void testLinGradDiagNorthSouth(){ this.runTest("2103", new LinearGradient(0, -1, 0, 1)); }
  @Test public void testLinGradDiagSouthNorth(){ this.runTest("2104", new LinearGradient(0, 1, 0, -1)); }
  @Test public void testLinGradDiagNonSquareNorthSouth() {
    this.ip = new ImageParameters(256, 128);
    this.opt.setWidth(256);
    this.runTest("2105", new LinearGradient(0, -1, 0, 1));
  }
View Full Code Here

Examples of vash.operation.LinearGradient

    this.runTest("2105", new LinearGradient(0, -1, 0, 1));
  }
  @Test public void testLinGradDiagNonSquareSouthNorth() {
    this.ip = new ImageParameters(256, 128);
    this.opt.setWidth(256);
    this.runTest("2106", new LinearGradient(0, 1, 0, -1)); }
View Full Code Here

Examples of vash.operation.LinearGradient

  @Test public void testLinGradDiagNonSquareSouthNorth() {
    this.ip = new ImageParameters(256, 128);
    this.opt.setWidth(256);
    this.runTest("2106", new LinearGradient(0, 1, 0, -1)); }
  @Test public void testLinGradDiagNorthSouthTiltedBig()  {
    this.runTest("2107", new LinearGradient(0, -1, 1, 1)); }
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.