Packages

 

com.aspose.cad.fileformats.cad

Class CadAciColor



  • public class CadAciColor
    extends Object

    Represents an indexed color.

    • Constructor Detail

      • CadAciColor

        public CadAciColor(byte r,
                   byte g,
                   byte b)

        Initializes a new instance of the CadAciColor class.

        Parameters:
        r - The Red Color
        g - The Green Color
        b - The Blue Color
      • CadAciColor

        public CadAciColor(float r,
                   float g,
                   float b)

        Initializes a new instance of the CadAciColor class.

        Parameters:
        r - The Red Color
        g - The Green Color
        b - The Blue Color
      • CadAciColor

        public CadAciColor(Color color)

        Initializes a new instance of the CadAciColor class.

        Parameters:
        color - The color.
      • CadAciColor

        public CadAciColor(short index)

        Initializes a new instance of the class.

        Parameters:
        index - The index.
        Throws:
        com.aspose.ms.System.ArgumentException - index out of range
    • Method Detail

      • getBlue

        public static CadAciColor getBlue()

        Gets the blue.

        Returns:
        The blue Color.
      • getByBlock

        public static CadAciColor getByBlock()

        Gets the ByBlock color.

      • getByLayer

        public static CadAciColor getByLayer()

        Gets the ByLayer color.

      • getCyan

        public static CadAciColor getCyan()

        Gets a default cyan color.

      • getDarkGrey

        public static CadAciColor getDarkGrey()

        Gets a default dark grey color.

        Returns:
        The dark grey.
      • getDefault

        public static CadAciColor getDefault()

        Gets a default white/black color.

      • getGreen

        public static CadAciColor getGreen()

        Gets a default green color.

      • getLightGrey

        public static CadAciColor getLightGrey()

        Gets a default light grey color.

      • getMagenta

        public static CadAciColor getMagenta()

        Gets a default magenta color.

      • getRed

        public static CadAciColor getRed()

        Gets a default red color.

      • getYellow

        public static CadAciColor getYellow()

        Gets a default yellow color.

      • getIndex

        public short getIndex()

        Gets or sets the color index.


        Accepted color index values range from 0 to 256. Indexes from 1 to 255 represents a color, the index 256 is reserved to define a color bylayer and the index 0 represents byblock.

      • setIndex

        public void setIndex(short value)

        Gets or sets the color index.


        Accepted color index values range from 0 to 256. Indexes from 1 to 255 represents a color, the index 256 is reserved to define a color bylayer and the index 0 represents byblock.

      • toColor

        public Color toColor()

        Converts the CadAciColor to a Colorcolor.

        Returns:
        A default color white will be used for byblock and bylayer colors.
      • toColor_internalized

        public com.aspose.ms.System.Drawing.Color toColor_internalized()
      • toString

        public String toString()

        Converts the value of this instance to its equivalent string representation.

        Overrides:
        toString in class Object
        Returns:
        The string representation.