コード例 #1
0
 public Separation(String name, PdfColorSpace alternateSpace, PdfFunction tintTransform)
     : this(new PdfName(name), alternateSpace.GetPdfObject(), tintTransform.GetPdfObject())
 {
     if (!tintTransform.CheckCompatibilityWithColorSpace(alternateSpace))
     {
         throw new PdfException(PdfException.FunctionIsNotCompatibleWitColorSpace, this);
     }
 }
コード例 #2
0
 public DeviceN(IList <String> names, PdfColorSpace alternateSpace, PdfFunction tintTransform)
     : this(new PdfArray(names, true), alternateSpace.GetPdfObject(), tintTransform.GetPdfObject())
 {
     if (tintTransform.GetInputSize() != GetNumberOfComponents() || tintTransform.GetOutputSize() != alternateSpace
         .GetNumberOfComponents())
     {
         throw new PdfException(PdfException.FunctionIsNotCompatibleWitColorSpace, this);
     }
 }
コード例 #3
0
 public TensorProductPatchMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int bitsPerFlag
                               , PdfArray decode)
     : base(new PdfStream(), PdfShading.ShadingType.TENSOR_PRODUCT_PATCH_MESH, cs.GetPdfObject())
 {
     SetBitsPerCoordinate(bitsPerCoordinate);
     SetBitsPerComponent(bitsPerComponent);
     SetBitsPerFlag(bitsPerFlag);
     SetDecode(decode);
 }
コード例 #4
0
 public CoonsPatchMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int bitsPerFlag, PdfArray
                       decode)
     : base(new PdfStream(), PdfShading.ShadingType.COONS_PATCH_MESH, cs.GetPdfObject())
 {
     SetBitsPerCoordinate(bitsPerCoordinate);
     SetBitsPerComponent(bitsPerComponent);
     SetBitsPerFlag(bitsPerFlag);
     SetDecode(decode);
 }
コード例 #5
0
 public Radial(PdfColorSpace cs, float x0, float y0, float r0, float[] color0, float x1, float y1, float r1
               , float[] color1, bool[] extend)
     : this(cs, x0, y0, r0, color0, x1, y1, r1, color1)
 {
     if (extend != null)
     {
         SetExtend(extend[0], extend[1]);
     }
 }
コード例 #6
0
 public FreeFormGouraudShadedTriangleMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int
                                          bitsPerFlag, PdfArray decode)
     : base(new PdfStream(), PdfShading.ShadingType.FREE_FORM_GOURAUD_SHADED_TRIANGLE_MESH, cs.GetPdfObject())
 {
     SetBitsPerCoordinate(bitsPerCoordinate);
     SetBitsPerComponent(bitsPerComponent);
     SetBitsPerFlag(bitsPerFlag);
     SetDecode(decode);
 }
コード例 #7
0
            public Radial(PdfColorSpace cs, float x0, float y0, float r0, float[] color0, float x1, float y1, float r1
                          , float[] color1)
                : base(new PdfDictionary(), PdfShading.ShadingType.RADIAL, cs.GetPdfObject())
            {
                SetCoords(x0, y0, r0, x1, y1, r1);
                PdfFunction func = new PdfFunction.Type2(new PdfArray(new float[] { 0, 1 }), null, new PdfArray(color0), new
                                                         PdfArray(color1), new PdfNumber(1));

                SetFunction(func);
            }
コード例 #8
0
 public LatticeFormGouraudShadedTriangleMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent,
                                             int verticesPerRow, PdfArray decode)
     : base(new PdfStream(), PdfShading.ShadingType.LATTICE_FORM_GOURAUD_SHADED_TRIANGLE_MESH, cs.GetPdfObject(
                ))
 {
     SetBitsPerCoordinate(bitsPerCoordinate);
     SetBitsPerComponent(bitsPerComponent);
     SetVerticesPerRow(verticesPerRow);
     SetDecode(decode);
 }
コード例 #9
0
            public Axial(PdfColorSpace cs, float x0, float y0, float[] color0, float x1, float y1, float[] color1)
                : base(new PdfDictionary(), PdfShading.ShadingType.AXIAL, cs.GetPdfObject())
            {
                if (cs is PdfSpecialCs.Pattern)
                {
                    throw new ArgumentException("colorSpace");
                }
                SetCoords(x0, y0, x1, y1);
                PdfFunction func = new PdfFunction.Type2(new PdfArray(new float[] { 0, 1 }), null, new PdfArray(color0), new
                                                         PdfArray(color1), new PdfNumber(1));

                SetFunction(func);
            }
コード例 #10
0
 public UncoloredTilingPattern(PdfColorSpace underlyingColorSpace)
     : base(new PdfArray(JavaUtil.ArraysAsList(PdfName.Pattern, underlyingColorSpace.GetPdfObject())))
 {
 }
コード例 #11
0
 public TensorProductPatchMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int bitsPerFlag
                               , float[] decode)
     : this(cs, bitsPerCoordinate, bitsPerComponent, bitsPerFlag, new PdfArray(decode))
 {
 }
コード例 #12
0
 public LatticeFormGouraudShadedTriangleMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent,
                                             int verticesPerRow, float[] decode)
     : this(cs, bitsPerCoordinate, bitsPerComponent, verticesPerRow, new PdfArray(decode))
 {
 }
コード例 #13
0
 public FreeFormGouraudShadedTriangleMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int
                                          bitsPerFlag, float[] decode)
     : this(cs, bitsPerCoordinate, bitsPerComponent, bitsPerFlag, new PdfArray(decode))
 {
 }
コード例 #14
0
 public Radial(PdfColorSpace cs, PdfArray coords, PdfFunction function)
     : base(new PdfDictionary(), PdfShading.ShadingType.RADIAL, cs.GetPdfObject())
 {
     SetCoords(coords);
     SetFunction(function);
 }
コード例 #15
0
 public override int GetNumberOfComponents()
 {
     return(PdfColorSpace.MakeColorSpace(((PdfArray)GetPdfObject()).Get(1)).GetNumberOfComponents());
 }
コード例 #16
0
 public virtual PdfColorSpace GetUnderlyingColorSpace()
 {
     return(PdfColorSpace.MakeColorSpace(((PdfArray)GetPdfObject()).Get(1)));
 }
コード例 #17
0
 public FunctionBased(PdfColorSpace colorSpace, PdfFunction function)
     : this(colorSpace.GetPdfObject(), function)
 {
 }