Class PdfBoxGraphics2DColor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int alpha  
      private org.apache.pdfbox.pdmodel.graphics.color.PDColor color  
      private boolean overprint  
      • Fields inherited from class java.awt.Color

        black, BLACK, blue, BLUE, cyan, CYAN, DARK_GRAY, darkGray, gray, GRAY, green, GREEN, LIGHT_GRAY, lightGray, magenta, MAGENTA, orange, ORANGE, pink, PINK, red, RED, white, WHITE, yellow, YELLOW
      • Fields inherited from interface java.awt.Transparency

        BITMASK, OPAQUE, TRANSLUCENT
    • Constructor Summary

      Constructors 
      Constructor Description
      PdfBoxGraphics2DColor​(org.apache.pdfbox.pdmodel.graphics.color.PDColor color)  
      PdfBoxGraphics2DColor​(org.apache.pdfbox.pdmodel.graphics.color.PDColor color, int alpha)  
      PdfBoxGraphics2DColor​(org.apache.pdfbox.pdmodel.graphics.color.PDColor color, int alpha, boolean overprint)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAlpha()  
      boolean isOverprint()  
      org.apache.pdfbox.pdmodel.graphics.color.PDColor toPDColor()  
      private static int toRGBValue​(org.apache.pdfbox.pdmodel.graphics.color.PDColor color, int alpha)  
      • Methods inherited from class java.awt.Color

        brighter, createContext, darker, decode, equals, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • color

        private final org.apache.pdfbox.pdmodel.graphics.color.PDColor color
      • alpha

        private final int alpha
      • overprint

        private final boolean overprint
    • Constructor Detail

      • PdfBoxGraphics2DColor

        public PdfBoxGraphics2DColor​(org.apache.pdfbox.pdmodel.graphics.color.PDColor color)
        Parameters:
        color - the PDColor
      • PdfBoxGraphics2DColor

        public PdfBoxGraphics2DColor​(org.apache.pdfbox.pdmodel.graphics.color.PDColor color,
                                     int alpha)
        Parameters:
        color - the PDColor
        alpha - the alpha to use
      • PdfBoxGraphics2DColor

        public PdfBoxGraphics2DColor​(org.apache.pdfbox.pdmodel.graphics.color.PDColor color,
                                     int alpha,
                                     boolean overprint)
        Parameters:
        color - the PDColor
        alpha - the alpha to use
        overprint - determine if overprint should be used
    • Method Detail

      • toRGBValue

        private static int toRGBValue​(org.apache.pdfbox.pdmodel.graphics.color.PDColor color,
                                      int alpha)
      • getAlpha

        public int getAlpha()
        Overrides:
        getAlpha in class java.awt.Color
      • isOverprint

        public boolean isOverprint()
        Specified by:
        isOverprint in interface IPdfBoxGraphics2DColor
        Returns:
        true if this color should be applied with overprint
      • toPDColor

        public org.apache.pdfbox.pdmodel.graphics.color.PDColor toPDColor()
        Specified by:
        toPDColor in interface IPdfBoxGraphics2DColor
        Returns:
        the PDColor represented by this color object