Package org.gvsig.dwg.lib.util
Class AcadColor
java.lang.Object
org.gvsig.dwg.lib.util.AcadColor
This class allows to convert Autocad colors in Java colors
- Author:
- jmorell
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAcadColor(int code, double r0, double g0, double b0, double r, double g, double b) This method is used to build the Autocad color table -
Method Summary
-
Field Details
-
BYLAYER
public static final int BYLAYERWhen Autocad color is 256, then the color of the object is the color of it layer- See Also:
-
BYBLOCK
public static final int BYBLOCKWhen Autocad color is 0, then the color of the object is the color of the block where it is placed- See Also:
-
-
Constructor Details
-
AcadColor
public AcadColor(int code, double r0, double g0, double b0, double r, double g, double b) This method is used to build the Autocad color table- Parameters:
code- Code is the Autocad color numberr0- r0 is the red component (0-1)g0- g0 is the green component (0-1)b0- b0 is the blue component (0-1)r- r0 is the red component (0-255)g- g0 is the green component (0-255)b- b0 is the blue component (0-255)
-
-
Method Details
-
getColor
This method uses Autocad color table for convert a color in the Autocad color code in a java Color- Parameters:
code- This int is the Autocad color number- Returns:
- Color Java Color corresponding to the Autocad color number argument
-
initTable
Initialize an Autocad color table- Returns:
- AcadColor[] Object of this class that represents Acad color to Java color conversion
-