Examples of ColorGradient


Examples of engine.parameters.ColorGradient

      Logger.logWarning(this, "Popup Action without an active gradient.");
      return;
    }
   
    if (command.equals("Reverse")) {
      ColorGradient temp = new ColorGradient();
      int num = m_ActiveGradient.getNumEntries();
      for (int i = 0; i < num; i++)
        temp.addEntry(m_ActiveGradient.getEntryColor(i), 1.0f - m_ActiveGradient.getEntryPosition(i));
      m_ActiveGradient.setFrom(temp);
      setColorGradient(m_ActiveGradient);
    } else if (command.equals("Random")) {
      ms_Presets.get(0).updateGradient(m_ActiveGradient); // remember the old one at the first position
      m_ActiveGradient.clear();
View Full Code Here

Examples of toxi.color.ColorGradient

        assertEquals(c.black(), d.black());
        assertEquals(c.alpha(), d.alpha());
    }

    public void testGradient() {
        ColorGradient grad = new ColorGradient();
        grad.addColorAt(0, TColor.RED);
        grad.addColorAt(0.5f, TColor.RED);
        grad.addColorAt(2.5f, TColor.YELLOW);
        grad.addColorAt(299f, TColor.BLUE);
        ColorList cols = grad.calcGradient();
        // assertEquals(TColor.BLUE, cols.get(-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.