Examples of PdfLiteral


Examples of com.lowagie.text.pdf.PdfLiteral

                            len -= 2;
                            int gray = getWord(is);
                            if (bitDepth == 16)
                                transRedGray = gray;
                            else
                                additional.put(PdfName.MASK, new PdfLiteral("["+gray+" "+gray+"]"));
                        }
                        break;
                    case 2:
                        if (len >= 6) {
                            len -= 6;
                            int red = getWord(is);
                            int green = getWord(is);
                            int blue = getWord(is);
                            if (bitDepth == 16) {
                                transRedGray = red;
                                transGreen = green;
                                transBlue = blue;
                            }
                            else
                                additional.put(PdfName.MASK, new PdfLiteral("["+red+" "+red+" "+green+" "+green+" "+blue+" "+blue+"]"));
                        }
                        break;
                    case 3:
                        if (len > 0) {
                            trans = new byte[len];
View Full Code Here

Examples of com.lowagie.text.pdf.PdfLiteral

            if ((colorType & 2) == 0) {
                if (gamma == 1f)
                    return PdfName.DEVICEGRAY;
                array.add(PdfName.CALGRAY);
                dic.put(PdfName.GAMMA, new PdfNumber(gamma));
                dic.put(PdfName.WHITEPOINT, new PdfLiteral("[1 1 1]"));
                array.add(dic);
            }
            else {
                PdfObject wp = new PdfLiteral("[1 1 1]");
                array.add(PdfName.CALRGB);
                if (gamma != 1f) {
                    PdfArray gm = new PdfArray();
                    PdfNumber n = new PdfNumber(gamma);
                    gm.add(n);
View Full Code Here

Examples of com.lowagie.text.pdf.PdfLiteral

            }
            if ((colorType & 4) != 0)
                palShades = true;
            genBWMask = (!palShades && (pal0 > 1 || transRedGray >= 0));
            if (!palShades && !genBWMask && pal0 == 1) {
                additional.put(PdfName.MASK, new PdfLiteral("["+palIdx+" "+palIdx+"]"));
            }
            boolean needDecode = (interlaceMethod == 1) || (bitDepth == 16) || ((colorType & 4) != 0) || palShades || genBWMask;
            switch (colorType) {
                case 0:
                    inputBands = 1;
View Full Code Here

Examples of com.lowagie.text.pdf.PdfLiteral

                            len -= 2;
                            int gray = getWord(is);
                            if (bitDepth == 16)
                                transRedGray = gray;
                            else
                                additional.put(PdfName.MASK, new PdfLiteral("["+gray+" "+gray+"]"));
                        }
                        break;
                    case 2:
                        if (len >= 6) {
                            len -= 6;
                            int red = getWord(is);
                            int green = getWord(is);
                            int blue = getWord(is);
                            if (bitDepth == 16) {
                                transRedGray = red;
                                transGreen = green;
                                transBlue = blue;
                            }
                            else
                                additional.put(PdfName.MASK, new PdfLiteral("["+red+" "+red+" "+green+" "+green+" "+blue+" "+blue+"]"));
                        }
                        break;
                    case 3:
                        if (len > 0) {
                            trans = new byte[len];
View Full Code Here

Examples of com.lowagie.text.pdf.PdfLiteral

            if ((colorType & 2) == 0) {
                if (gamma == 1f)
                    return PdfName.DEVICEGRAY;
                array.add(PdfName.CALGRAY);
                dic.put(PdfName.GAMMA, new PdfNumber(gamma));
                dic.put(PdfName.WHITEPOINT, new PdfLiteral("[1 1 1]"));
                array.add(dic);
            }
            else {
                PdfObject wp = new PdfLiteral("[1 1 1]");
                array.add(PdfName.CALRGB);
                if (gamma != 1f) {
                    PdfArray gm = new PdfArray();
                    PdfNumber n = new PdfNumber(gamma);
                    gm.add(n);
View Full Code Here

Examples of com.lowagie.text.pdf.PdfLiteral

            }
            if ((colorType & 4) != 0)
                palShades = true;
            genBWMask = (!palShades && (pal0 > 1 || transRedGray >= 0));
            if (!palShades && !genBWMask && pal0 == 1) {
                additional.put(PdfName.MASK, new PdfLiteral("["+palIdx+" "+palIdx+"]"));
            }
            boolean needDecode = (interlaceMethod == 1) || (bitDepth == 16) || ((colorType & 4) != 0) || palShades || genBWMask;
            switch (colorType) {
                case 0:
                    inputBands = 1;
View Full Code Here

Examples of com.lowagie.text.pdf.PdfLiteral

        this.resources = resources;
        try {
            PdfContentParser ps = new PdfContentParser(new PRTokeniser(contentBytes));
            ArrayList operands = new ArrayList();
            while (ps.parse(operands).size() > 0){
                PdfLiteral operator = (PdfLiteral)operands.get(operands.size()-1);
                invokeOperator(operator, operands);
            }
           
        }
        catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.