Class PdfShading


  • public class PdfShading
    extends java.lang.Object
    Implements the shading dictionary (or stream).
    • Field Detail

      • shadingType

        private int shadingType
      • shadingName

        private PdfName shadingName
      • cspace

        private java.awt.Color cspace
      • bBox

        private float[] bBox
        Holds value of property bBox.
      • antiAlias

        private boolean antiAlias
        Holds value of property antiAlias.
    • Constructor Detail

      • PdfShading

        private PdfShading​(PdfWriter writer)
        Creates new PdfShading
    • Method Detail

      • setColorSpace

        private void setColorSpace​(java.awt.Color color)
      • getColorSpace

        public java.awt.Color getColorSpace()
      • throwColorSpaceError

        private static void throwColorSpaceError()
      • checkCompatibleColors

        private static void checkCompatibleColors​(java.awt.Color c1,
                                                  java.awt.Color c2)
      • getColorArray

        private static float[] getColorArray​(java.awt.Color color)
      • type2

        private static PdfShading type2​(PdfWriter writer,
                                        java.awt.Color colorSpace,
                                        float[] coords,
                                        float[] domain,
                                        PdfFunction function,
                                        boolean[] extend)
      • type3

        private static PdfShading type3​(PdfWriter writer,
                                        java.awt.Color colorSpace,
                                        float[] coords,
                                        float[] domain,
                                        PdfFunction function,
                                        boolean[] extend)
      • simpleAxial

        private static PdfShading simpleAxial​(PdfWriter writer,
                                              float x0,
                                              float y0,
                                              float x1,
                                              float y1,
                                              java.awt.Color startColor,
                                              java.awt.Color endColor,
                                              boolean extendStart,
                                              boolean extendEnd)
      • simpleAxial

        static PdfShading simpleAxial​(PdfWriter writer,
                                      float x0,
                                      float y0,
                                      float x1,
                                      float y1,
                                      java.awt.Color startColor,
                                      java.awt.Color endColor)
      • simpleRadial

        private static PdfShading simpleRadial​(PdfWriter writer,
                                               float x0,
                                               float y0,
                                               float r0,
                                               float x1,
                                               float y1,
                                               float r1,
                                               java.awt.Color startColor,
                                               java.awt.Color endColor,
                                               boolean extendStart,
                                               boolean extendEnd)
      • getShadingName

        PdfName getShadingName()
      • setName

        void setName​(int number)
      • addToBody

        void addToBody()
                throws java.io.IOException
        Throws:
        java.io.IOException
      • getBBox

        public float[] getBBox()
      • setBBox

        public void setBBox​(float[] bBox)
      • isAntiAlias

        public boolean isAntiAlias()
      • setAntiAlias

        public void setAntiAlias​(boolean antiAlias)