/*
* $Id$
* This file is a part of the Arakhne Foundation Classes, http://www.arakhne.org/afc
*
* Copyright (c) 2000-2012 Stephane GALLAND.
* Copyright (c) 2005-10, Multiagent Team, Laboratoire Systemes et Transports,
* Universite de Technologie de Belfort-Montbeliard.
* Copyright (c) 2013-2016 The original authors, and other authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.arakhne.afc.ui.vector;
import java.io.Serializable;
/** Interface that is representing a color.
* See {@link VectorToolkit} to create an instance.
* For color constants, see {@link VectorToolkit}.
*
* @author $Author: sgalland$
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
* @deprecated see JavaFX API
*/
@Deprecated
public interface Color extends Paint, Serializable {
/**
* Returns the green component in the range 0-255 in the default sRGB
* space.
* @return the green component.
* @see #getRGB
*/
public int getGreen();
/**
* Returns the red component in the range 0-255 in the default sRGB
* space.
* @return the red component.
* @see #getRGB
*/
public int getRed();
/**
* Returns the blue component in the range 0-255 in the default sRGB
* space.
* @return the blue component.
* @see #getRGB
*/
public int getBlue();
/**
* Returns the alpha component in the range 0-255.
* @return the alpha component.
* @see #getRGB
*/
public int getAlpha();
/**
* Returns the RGB value representing the color.
* (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are
* blue).
* @return the RGB value of the color in the default sRGB
* <code>ColorModel</code>.
* @see java.awt.image.ColorModel#getRGBdefault
* @see #getRed
* @see #getGreen
* @see #getBlue
* @since JDK1.0
*/
public int getRGB();
/**
* Creates a new <code>Color</code> that is a brighter version of this
* <code>Color</code>.
* <p>
* This method applies an arbitrary scale factor to each of the three RGB
* components of this <code>Color</code> to create a brighter version
* of this <code>Color</code>.
* The {@code alpha} value is preserved.
* Although <code>brighter</code> and
* <code>darker</code> are inverse operations, the results of a
* series of invocations of these two methods might be inconsistent
* because of rounding errors.
* @return a new <code>Color</code> object that is
* a brighter version of this <code>Color</code>
* with the same {@code alpha} value.
* @see java.awt.Color#darker
*/
public Color brighterColor();
/**
* Creates a new <code>Color</code> that is a darker version of this
* <code>Color</code>.
* <p>
* This method applies an arbitrary scale factor to each of the three RGB
* components of this <code>Color</code> to create a darker version of
* this <code>Color</code>.
* The {@code alpha} value is preserved.
* Although <code>brighter</code> and
* <code>darker</code> are inverse operations, the results of a series
* of invocations of these two methods might be inconsistent because
* of rounding errors.
* @return a new <code>Color</code> object that is
* a darker version of this <code>Color</code>
* with the same {@code alpha} value.
* @see java.awt.Color#brighter
*/
public Color darkerColor();
/** Make a color transparent.
*
* @return the transparent color.
*/
public Color transparentColor();
/**
* Returns the HSB model representing the color.
*
* The <code>saturation</code> and <code>brightness</code>
* components should be
* floating-point values between zero and one
* (numbers in the range 0.0-1.0). The <code>hue</code> component
* can be any floating-point number. The floor of this number is
* subtracted from it to create a fraction between 0 and 1. This
* fractional number is then multiplied by 360 to produce the hue
* angle in the HSB color model.
*
* @return the HSB value of the color.
*/
public float[] getHSB();
/**
* Returns Saturation in the the HSB model representing the color.
*
* @return the <code>saturation</code>, a
* floating-point values between zero and one
* (numbers in the range 0.0-1.0).
*/
public float getSaturation();
/**
* Returns Brightness in the the HSB model representing the color.
*
* @return the <code>brightness</code>, a
* floating-point values between zero and one
* (numbers in the range 0.0-1.0).
*/
public float getBrightness();
/**
* Returns the Hue in the HSB model representing the color.
*
* @return the <code>hue</code>, can be any floating-point number.
* The floor of this number is subtracted from it to create a
* fraction between 0 and 1. This fractional number is then
* multiplied by 360 to produce the hue angle in the HSB color model.
*/
public float getHue();
}