Examples of Gradient


Examples of ca.grimoire.jnoise.modules.basic.Gradient

    if (!seedSet)
      throw new BuilderException ("No seed for gradient module.");
    if (quality == null)
      throw new BuilderException ("No quality for gradient module.");

    return new Gradient (seed, quality);
  }
View Full Code Here

Examples of ca.grimoire.jnoise.modules.basic.Gradient

  public RidgedMultifractal (int seed, int octaves, double lacunarity,
      double weight, double frequency, Quality quality) {
    assert (octaves >= 0);
    assert (quality != null);

    generator = new Gradient (seed, quality);
    this.frequency = frequency;
    this.weight = weight;
    this.lacunarity = lacunarity;
    this.octaves = octaves;
    this.weights = generateSpectralWeights (lacunarity, octaves, weight,
View Full Code Here

Examples of ca.grimoire.jnoise.modules.basic.Gradient

  private static Scale createPerlinOctave (int octave, int seed,
      double lacunarity, double persistence, Quality quality) {
    double frequency = Math.pow (lacunarity, octave);
    double amplitude = Math.pow (persistence, octave);

    Gradient generator = new Gradient (seed + octave, quality);
    return new Scale (new Bias (generator, amplitude), frequency);
  }
View Full Code Here

Examples of ca.grimoire.jnoise.modules.basic.Gradient

    this.octaves = octaves;
    this.seed = seed;

    this.generators = new Gradient[octaves];
    for (int octave = 0; octave < octaves; ++octave)
      generators[octave] = new Gradient (seed + octave, quality);
  }
View Full Code Here

Examples of ca.grimoire.jnoise.modules.generation.Gradient

    if (!hasAmplitude)
      throw new BuilderException ("Gradient requires amplitude.");
    if (frequency < 0.0)
      throw new BuilderException ("Gradient requires non-negative frequency.");

    return new Gradient (frequency, amplitude);
  }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Gradient

      fill.setPropertyBoolean("on", false);
    } else {
      if (sprite.isFillDirty() || ignoreOptimizations) {
        fill.setPropertyBoolean("on", true);
        if (sprite.getFill() instanceof Gradient) {
          Gradient gradient = (Gradient) sprite.getFill();
          // VML angle is offset and inverted from standard, and must be
          // adjusted
          // to match rotation transform
          final double degrees;
          if (sprite.getRotation() != null) {
            degrees = sprite.getRotation().getDegrees();
          } else {
            degrees = 0;
          }

          double angle;
          angle = -(gradient.getAngle() + 270 + degrees) % 360.0;
          // IE will flip the angle at 0 degrees...
          if (angle == 0) {
            angle = 180;
          }
          fill.setPropertyDouble("angle", angle);
          fill.setPropertyString("type", "gradient");
          fill.setPropertyString("method", "sigma");
          StringBuilder stops = new StringBuilder();
          for (Stop stop : gradient.getStops()) {
            if (stops.length() > 0) {
              stops.append(", ");
            }
            stops.append(stop.getOffset()).append("% ").append(stop.getColor());
          }
View Full Code Here

Examples of com.sun.star.awt.Gradient

     
      /* apply a gradient fill style that goes from top left to bottom
         right and is changing its color from green to yellow */
      xPropSet.setPropertyValue( "FillStyle",
                                       com.sun.star.drawing.FillStyle.GRADIENT );
      Gradient aGradient = new Gradient();
      aGradient.Style = GradientStyle.LINEAR;
      aGradient.StartColor = 0x00ff00;
      aGradient.EndColor = 0xffff00;
      aGradient.Angle = 450;
      aGradient.Border = 0;
View Full Code Here

Examples of com.sun.star.awt.Gradient

     
      /* apply a gradient fill style that goes from top left to bottom
         right and is changing its color from green to yellow */
      xPropSet.setPropertyValue( "FillStyle",
                                       com.sun.star.drawing.FillStyle.GRADIENT );
      Gradient aGradient = new Gradient();
      aGradient.Style = GradientStyle.LINEAR;
      aGradient.StartColor = 0x00ff00;
      aGradient.EndColor = 0xffff00;
      aGradient.Angle = 450;
      aGradient.Border = 0;
View Full Code Here

Examples of com.sun.star.awt.Gradient

    public void setGradient(XShape xShape, GradientStyle gradientStyle, int startColor, int endColor, short angle, short border, short xOffset, short yOffset, short startIntensity, short endIntensity){
        XPropertySet xProp = null;
        try {
            xProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xShape);
            xProp.setPropertyValue("FillStyle", FillStyle.GRADIENT);
            Gradient aGradient = new Gradient();
            aGradient.Style = gradientStyle;
            aGradient.StartColor = startColor;
            aGradient.EndColor = endColor;
            aGradient.Angle = angle;
            aGradient.Border = border;
View Full Code Here

Examples of com.sun.star.awt.Gradient

    public void setGradientOfShape(XShape xShape, int startColor, int endColor){
        try{
            XPropertySet xShapeProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xShape);
            xShapeProps.setPropertyValue("FillStyle", FillStyle.GRADIENT);
            Gradient aGradient = new Gradient();
            aGradient.Style = GradientStyle.LINEAR;
            aGradient.StartColor = startColor;
            aGradient.EndColor = endColor;
            aGradient.Angle = 1800;
            aGradient.Border = 0;
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.