Examples of PDFColor


Examples of org.apache.fop.pdf.PDFColor

            h *= -1;

        int row = (int)((pageHeight - (y / 100)) * 100 * yFactor);
        int col = (int)(x * xFactor);

        PDFColor sc = (PDFColor)stroke;
        PDFColor fc = (PDFColor)fill;

        sc.setColorSpace(ColorSpace.DEVICE_RGB);
        fc.setColorSpace(ColorSpace.DEVICE_RGB);

        int lineshade =
            (int)(100
                  - ((0.3f * sc.red() + 0.59f * sc.green() + 0.11f * sc.blue())
                     * 100f));
        int fillshade =
            (int)(100
                  - ((0.3f * fc.red() + 0.59f * fc.green() + 0.11f * fc.blue())
                     * 100f));
        if (debug)
            System.out.println("TXTRenderer.addRect(" + x + ", " + y + ", "
                               + w + ", " + h + ", " + stroke + ", " + fill
                               + ") fillshade=" + fillshade);
View Full Code Here

Examples of org.apache.fop.pdf.PDFColor

    boolean printBMP(FopImage img, int x, int y, int w,
                     int h) throws FopImageException {
        if (debug)
            System.out.println("TXTRenderer.printBMP(" + img + ", " + x
                               + ", " + y + ", " + w + ", " + h + ")");
        addRect(x, y, w, h, new PDFColor(1f, 1f, 1f),
                new PDFColor(0f, 0f, 0f));
        int nameh = (int)(h * yFactor / 2);
        if (nameh > 0) {
            int namew = (int)(w * xFactor);

            if (namew > 4) {
View Full Code Here

Examples of org.apache.fop.pdf.PDFColor

        if ((w == 0) || (h == 0))
            return;
        if (h < 0)
            h *= -1;

        PDFColor sc = (PDFColor)stroke;
        PDFColor fc = (PDFColor)fill;

        sc.setColorSpace(ColorSpace.DEVICE_RGB);
        fc.setColorSpace(ColorSpace.DEVICE_RGB);

        int lineshade =
            (int)(100
                  - ((0.3f * sc.red() + 0.59f * sc.green() + 0.11f * sc.blue())
                     * 100f));
        int fillshade =
            (int)(100
                  - ((0.3f * fc.red() + 0.59f * fc.green() + 0.11f * fc.blue())
                     * 100f));

        int xpos = xoffset + (x / 100);
        if (xpos < 0) {
            xpos = 0;
View Full Code Here

Examples of org.apache.fop.pdf.PDFColor

        int size = area.getFontState().getFontSize();

        float red = area.getRed();
        float green = area.getGreen();
        float blue = area.getBlue();
        PDFColor theAreaColor = new PDFColor((double)area.getRed(),
                                             (double)area.getGreen(),
                                             (double)area.getBlue());

        // currentStream.add("\033*c" + (int)(100 - ((0.3f * red + 0.59f * green + 0.11f * blue) * 100f)) + "G\033*v2T");
        currentStream.add("\033*v1O\033*c"
 
View Full Code Here

Examples of org.apache.fop.pdf.PDFColor

                        for (int i = 0;
                                i < ((IndexColorModel)cm).getMapSize(); i++) {
                            if ((alphas[i] & 0xFF) == 0) {
                                this.m_isTransparent = true;
                                this.m_transparentColor =
                                    new PDFColor((int)(reds[i] & 0xFF),
                                                 (int)(greens[i] & 0xFF),
                                                 (int)(blues[i] & 0xFF));
                                break;
                            }
                        }
View Full Code Here

Examples of org.apache.fop.pdf.PDFColor

                        for (int i = 0;
                                i < ((IndexColorModel)cm).getMapSize(); i++) {
                            if ((alphas[i] & 0xFF) == 0) {
                                this.m_isTransparent = true;
                                this.m_transparentColor =
                                    new PDFColor((int)(reds[i] & 0xFF),
                                                 (int)(greens[i] & 0xFF),
                                                 (int)(blues[i] & 0xFF));
                                break;
                            }
                        }
View Full Code Here

Examples of org.apache.fop.pdf.PDFColor

                        for (int i = 0;
                                i < ((IndexColorModel)cm).getMapSize(); i++) {
                            if ((alphas[i] & 0xFF) == 0) {
                                this.m_isTransparent = true;
                                this.m_transparentColor =
                                    new PDFColor((int)(reds[i] & 0xFF),
                                                 (int)(greens[i] & 0xFF),
                                                 (int)(blues[i] & 0xFF));
                                break;
                            }
                        }
View Full Code Here

Examples of org.apache.fop.pdf.PDFColor

                        for (int i = 0;
                                i < ((IndexColorModel)cm).getMapSize(); i++) {
                            if ((alphas[i] & 0xFF) == 0) {
                                this.m_isTransparent = true;
                                this.m_transparentColor =
                                    new PDFColor((int)(reds[i] & 0xFF),
                                                 (int)(greens[i] & 0xFF),
                                                 (int)(blues[i] & 0xFF));
                                break;
                            }
                        }
View Full Code Here

Examples of org.apache.fop.pdf.PDFColor

        addRect(x, y, w, h, fill, fill);
    }

    protected void addFilledRect(int x, int y, int w, int h,
                                 ColorType col) {
        PDFColor pdfcol = new PDFColor(col);
        addRect(x, y, w, h, pdfcol, pdfcol);
    }
View Full Code Here

Examples of org.apache.fop.pdf.PDFColor

        int top = area.getBorderTopWidth();
        int bottom = area.getBorderBottomWidth();
        // If style is solid, use filled rectangles
        if (top != 0)
            addFilledRect(rx, ry, w, top,
                          new PDFColor(bp.getBorderColor(BorderAndPadding.TOP)));
        if (left != 0)
            addFilledRect(rx - left, ry - h - bottom, left, h + top + bottom,
                          new PDFColor(bp.getBorderColor(BorderAndPadding.LEFT)));
        if (right != 0)
            addFilledRect(rx + w, ry - h - bottom, right, h + top + bottom,
                          new PDFColor(bp.getBorderColor(BorderAndPadding.RIGHT)));
        if (bottom != 0)
            addFilledRect(rx, ry - h - bottom, w, bottom,
                          new PDFColor(bp.getBorderColor(BorderAndPadding.BOTTOM)));
    }
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.