FreeHEP API
Version v1.2.2

hep.graphics.heprep.util
Class HepRepColor

java.lang.Object
  |
  +--hep.graphics.heprep.util.HepRepColor

public class HepRepColor
extends Object

Static class to allow for color manipulation

Version:
$Id: HepRepColor.java,v 1.7 2003/08/15 01:27:02 tonyj Exp $
Author:
M.Donszelmann

Field Summary
static String cvsId
           
static Color invisible
          This color is used to tag items which should not be drawn.
 
Method Summary
static String get(Color color)
           
static Color get(String name)
          this method returns a Color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cvsId

public static final String cvsId
See Also:
Constant Field Values

invisible

public static final Color invisible
This color is used to tag items which should not be drawn. Users should test to see if this color is set, and then simply not draw the relevant figures. Simply drawing with this color will probably not have the desired effect. This color can be selected only by name.

Method Detail

get

public static final Color get(String name)
this method returns a Color. Colors are supposedly immutable and are returned from the same table. The RGBA formats, where Alpha is optional and defaults to 1, are:
      by name:          "yellow"                      , where alpha is always 1.0
      by int r,g,b,a:   "128, 255, 64, 255"           , where alpha (a) is optional
      by float r,g,b,a: "0.5, 1.0, 0.25, 1.0"         , where alpha (a) is optional
      by single number: "64637" or "0x0FFF08"         , where alpha is always 1.0
 

Parameters:
name - name/number of the color
Returns:
requested Color or defaulting to white in case of a invalid name (message is printed).

get

public static String get(Color color)

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.