Package org.apache.pdfbox.pdmodel.graphics.color

Examples of org.apache.pdfbox.pdmodel.graphics.color.PDColor


            colorValues.add( COSInteger.ZERO );
            colorValues.add( COSInteger.ZERO );
            colorValues.add( COSInteger.ZERO );
            dictionary.setItem( "C", colorValues );
        }
        PDColor color = new PDColor(colorValues.toFloatArray(), PDDeviceRGB.INSTANCE);
        return color;
    }
View Full Code Here


    @Override
    public void process(Operator operator, List<COSBase> arguments) throws IOException
    {
        COSArray array = new COSArray();
        array.addAll(arguments);
        setColor(new PDColor(array, getColorSpace()));
    }
View Full Code Here

     *
     * @return The structure element of this node.
     */
    public PDColor getTextColor()
    {
        PDColor retval = null;
        COSArray csValues = (COSArray)node.getDictionaryObject( COSName.C );
        if( csValues == null )
        {
            csValues = new COSArray();
            csValues.growToSize( 3, new COSFloat( 0 ) );
            node.setItem( COSName.C, csValues );
        }
        retval = new PDColor(csValues.toFloatArray(), PDDeviceRGB.INSTANCE);
        return retval;
    }
View Full Code Here

        saveGraphicsState();

        // non-colored patterns have to be given a color
        if (colorSpace != null)
        {
            color = new PDColor(color.getComponents(), colorSpace);
            getGraphicsState().setNonStrokingColorSpace(colorSpace);
            getGraphicsState().setNonStrokingColor(color);
            getGraphicsState().setStrokingColorSpace(colorSpace);
            getGraphicsState().setStrokingColor(color);
        }
View Full Code Here

        AffineTransform at = ctm.createAffineTransform();

        if (pdImage.isStencil())
        {
            // fill the image with paint
            PDColor color = getGraphicsState().getNonStrokingColor();
            BufferedImage image = pdImage.getStencilImage(getPaint(color));

            // draw the image
            drawBufferedImage(image, at);
        }
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.pdmodel.graphics.color.PDColor

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.