Examples of PDColorSpaceInstance


Examples of org.pdfbox.pdmodel.graphics.color.PDColorSpaceInstance

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

Examples of org.pdfbox.pdmodel.graphics.color.PDColorSpaceInstance

     * @throws IOException If an error occurs while processing the font.
     */
    public void process(PDFOperator operator, List arguments) throws IOException
    {
        PDColorSpace cs = PDDeviceCMYK.INSTANCE;
        PDColorSpaceInstance colorInstance = context.getGraphicsState().getStrokingColorSpace();
        colorInstance.setColorSpace( cs );
        float[] values = new float[4];
        for( int i=0; i<arguments.size(); i++ )
        {
            values[i] = ((COSNumber)arguments.get( i )).floatValue();
        }
        colorInstance.setColorSpaceValue( values );
    }
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.