Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PatternColor


                                case ExtendedColor.TYPE_SHADING:
                                    ShadingColor xc = (ShadingColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, xc.getPdfShadingPattern().getShading().getColorSpace());
                                    break;
                                case ExtendedColor.TYPE_PATTERN:
                                    PatternColor pc = (PatternColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, pc.getPainter().getDefaultColor());
                                    break;
                            }
                        }
                        else if (obj1 instanceof Color)
                            throw new PdfXConformanceException("Colorspace RGB is not allowed.");
View Full Code Here


            p2.addImage(img, img.getScaledWidth(), 0f, 0f, img.getScaledHeight(), 0f, 0f);
            p2.setPatternMatrix(1f, 0f, 0f, 1f, 60f, 60f);
            p2.sanityCheck();
           
            // See if we can apply the pattern color to chunk, phrase or paragraph
            PatternColor pat = new PatternColor(p);
            PatternColor pat1 = new PatternColor(p1);
            PatternColor pat2 = new PatternColor(p2);
            String text = "Text with pattern";
            document.add(new Paragraph(text, FontFactory.getFont(FontFactory.HELVETICA, 60, LwgFont.BOLD, new GrayColor(0.3f))));
            document.add(new Paragraph(text, FontFactory.getFont(FontFactory.HELVETICA, 60, LwgFont.BOLD, pat)));
           
            // draw a rectangle filled with star pattern
View Full Code Here

                                case ExtendedColor.TYPE_SHADING:
                                    ShadingColor xc = (ShadingColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, xc.getPdfShadingPattern().getShading().getColorSpace());
                                    break;
                                case ExtendedColor.TYPE_PATTERN:
                                    PatternColor pc = (PatternColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, pc.getPainter().getDefaultColor());
                                    break;
                            }
                        }
                        else if (obj1 instanceof Color)
                            throw new PdfXConformanceException(MessageLocalization.getComposedMessage("colorspace.rgb.is.not.allowed"));
View Full Code Here

                                case ExtendedColor.TYPE_SHADING:
                                    ShadingColor xc = (ShadingColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, xc.getPdfShadingPattern().getShading().getColorSpace());
                                    break;
                                case ExtendedColor.TYPE_PATTERN:
                                    PatternColor pc = (PatternColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, pc.getPainter().getDefaultColor());
                                    break;
                            }
                        }
                        else if (obj1 instanceof Color)
                            throw new PdfXConformanceException("Colorspace RGB is not allowed.");
View Full Code Here

                                case ExtendedColor.TYPE_SHADING:
                                    ShadingColor xc = (ShadingColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, xc.getPdfShadingPattern().getShading().getColorSpace());
                                    break;
                                case ExtendedColor.TYPE_PATTERN:
                                    PatternColor pc = (PatternColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, pc.getPainter().getDefaultColor());
                                    break;
                            }
                        }
                        else if (obj1 instanceof Color)
                            throw new PdfXConformanceException("Colorspace RGB is not allowed.");
View Full Code Here

                                case ExtendedColor.TYPE_SHADING:
                                    ShadingColor xc = (ShadingColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, xc.getPdfShadingPattern().getShading().getColorSpace());
                                    break;
                                case ExtendedColor.TYPE_PATTERN:
                                    PatternColor pc = (PatternColor)ec;
                                    checkPDFXConformance(writer, PDFXKEY_COLOR, pc.getPainter().getDefaultColor());
                                    break;
                            }
                        }
                        else if (obj1 instanceof Color)
                            throw new PdfXConformanceException(MessageLocalization.getComposedMessage("colorspace.rgb.is.not.allowed"));
View Full Code Here

            p2.addImage(img, img.getScaledWidth(), 0f, 0f, img.getScaledHeight(), 0f, 0f);
            p2.setPatternMatrix(1f, 0f, 0f, 1f, 60f, 60f);
            p2.sanityCheck();
           
            // See if we can apply the pattern color to chunk, phrase or paragraph
            PatternColor pat = new PatternColor(p);
            PatternColor pat1 = new PatternColor(p1);
            PatternColor pat2 = new PatternColor(p2);
            String text = "Text with pattern";
            document.add(new Paragraph(text, FontFactory.getFont(FontFactory.HELVETICA, 60, Font.BOLD, new GrayColor(0.3f))));
            document.add(new Paragraph(text, FontFactory.getFont(FontFactory.HELVETICA, 60, Font.BOLD, pat)));
           
            // draw a rectangle filled with star pattern
View Full Code Here

TOP

Related Classes of com.lowagie.text.pdf.PatternColor

Copyright © 2018 www.massapicom. 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.