Examples of HSBColor


Examples of com.alee.laf.colorchooser.HSBColor

    }

    public void setNewColor ( Color newColor )
    {
        this.newColor = newColor;
        this.newHSBColor = new HSBColor ( newColor );
        this.repaint ();
    }
View Full Code Here

Examples of com.alee.laf.colorchooser.HSBColor

    }

    public void setOldColor ( Color oldColor )
    {
        this.oldColor = oldColor;
        this.oldHSBColor = new HSBColor ( oldColor );
        this.repaint ();
    }
View Full Code Here

Examples of com.catehuston.imagefilter.model.HSBColor

    }

    // Return the color to display.
    float s = saturations[hue] / hueCount;
    float b = brightnesses[hue] / hueCount;
    return new HSBColor(hue, s, b);
  }
View Full Code Here

Examples of com.catehuston.imagefilter.model.HSBColor

  public void processImageForHue(PApplet applet, IFAImage image, int hueRange,
      int hueTolerance, boolean showHue) {
    applet.colorMode(PApplet.HSB, (hueRange - 1));
    image.loadPixels();
    int numberOfPixels = image.getPixels().length;
    HSBColor dominantHue = getDominantHue(applet, image, hueRange);
    // Manipulate photo, grayscale any pixel that isn't close to that hue.
    float lower = dominantHue.h - hueTolerance;
    float upper = dominantHue.h + hueTolerance;
    for (int i = 0; i < numberOfPixels; i++) {
      int pixel = image.getPixel(i);
View Full Code Here

Examples of com.catehuston.imagefilter.model.HSBColor

    // Out of range, looping under.
    assertFalse(colorHelper.hueInRange(6, 20, -5, 5));
  }

  @Test public void testHsbColorFromImage() {
    HSBColor color = colorHelper.getDominantHue(applet, image, 100);
    verify(image).loadPixels();

    // Check results.
    assertEquals(30F, color.h, 0);
    assertEquals(7F, color.s, 0);
View Full Code Here

Examples of org.jrebirth.af.core.resource.color.HSBColor

        checkHsbColor(TestColors.TEST_COLOR_HSB_3);
    }

    private void checkHsbColor(final ColorItem colorItem) {
        final Color color = colorItem.get();
        final HSBColor wc = (HSBColor) ResourceBuilders.COLOR_BUILDER.getParam(colorItem);

        assertEquals(color.getHue(), wc.hue(), 1.0);
        assertEquals(color.getSaturation(), wc.saturation(), 0.000001);
        assertEquals(color.getBrightness(), wc.brightness(), 0.000001);

        assertEquals(color.getOpacity(), wc.opacity(), 0.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.