Examples of PDColorSpaceInstance


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

    {
        try
        {
            super.process( operator, arguments );
            PageDrawer drawer = (PageDrawer)context;
            PDColorSpaceInstance colorInstance = drawer.getGraphicsState().getNonStrokingColorSpace();
            Color color = colorInstance.createColor();
            drawer.setNonStrokingColor( color );
        }
        catch( IOException e )
        {
            //ignore for now and continue drawing
View Full Code Here

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

     */
    public void process(PDFOperator operator, List arguments) throws IOException
    {
        super.process( operator, arguments );
        PageDrawer drawer = (PageDrawer)context;
        PDColorSpaceInstance colorInstance = drawer.getGraphicsState().getNonStrokingColorSpace();
        Color color = colorInstance.createColor();
        drawer.setNonStrokingColor( color );
    }
View Full Code Here

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

    {
        super.process( operator, arguments );
        try
        {
            PageDrawer drawer = (PageDrawer)context;
            PDColorSpaceInstance colorInstance = drawer.getGraphicsState().getNonStrokingColorSpace();
            Color color = colorInstance.createColor();
            drawer.setStrokingColor( color );
        }
        catch( IOException e )
        {
            //ignore for now and continue drawing
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().getNonStrokingColorSpace();
        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

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

        }
        if( cs == null )
        {
            cs = PDColorSpaceFactory.createColorSpace( name );
        }
        PDColorSpaceInstance colorInstance = context.getGraphicsState().getStrokingColorSpace();
        colorInstance.setColorSpace( cs );
        int numComponents = cs.getNumberOfComponents();
        float[] values = EMPTY_FLOAT_ARRAY;
        if( numComponents >= 0 )
        {
            values = new float[numComponents];
            for( int i=0; i<numComponents; i++ )
            {
                values[i] = 0f;
            }
            if( cs instanceof PDDeviceCMYK )
            {
                values[3] = 1f;
            }
        }
        colorInstance.setColorSpaceValue( values );
    }
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 = PDDeviceRGB.INSTANCE;
        PDColorSpaceInstance colorInstance = context.getGraphicsState().getNonStrokingColorSpace();
        colorInstance.setColorSpace( cs );
        float[] values = new float[3];
        for( int i=0; i<arguments.size(); i++ )
        {
            values[i] = ((COSNumber)arguments.get( i )).floatValue();
        }
        colorInstance.setColorSpaceValue( values );
    }
View Full Code Here

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

     */
    public void process(PDFOperator operator, List arguments) throws IOException
    {
        super.process( operator, arguments );
        PageDrawer drawer = (PageDrawer)context;
        PDColorSpaceInstance colorInstance = drawer.getGraphicsState().getNonStrokingColorSpace();
        Color color = colorInstance.createColor();
        drawer.setStrokingColor( color );
    }
View Full Code Here

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

            colorValues.add( COSInteger.ZERO );
            colorValues.add( COSInteger.ZERO );
            colorValues.add( COSInteger.ZERO );
            dictionary.setItem( "C", colorValues );
        }
        PDColorSpaceInstance instance = new PDColorSpaceInstance( colorValues );
        instance.setColorSpace( PDDeviceRGB.INSTANCE );
        return instance;
    }
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 = PDDeviceRGB.INSTANCE;
        PDColorSpaceInstance colorInstance = context.getGraphicsState().getStrokingColorSpace();
        colorInstance.setColorSpace( cs );
        float[] values = new float[3];
        for( int i=0; i<arguments.size(); i++ )
        {
            values[i] = ((COSNumber)arguments.get( i )).floatValue();
        }
        colorInstance.setColorSpaceValue( values );
    }
View Full Code Here

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

        }
        if( cs == null )
        {
            cs = PDColorSpaceFactory.createColorSpace( name );
        }
        PDColorSpaceInstance colorInstance = context.getGraphicsState().getNonStrokingColorSpace();
        colorInstance.setColorSpace( cs );
        int numComponents = cs.getNumberOfComponents();
        float[] values = EMPTY_FLOAT_ARRAY;
        if( numComponents >= 0 )
        {
            values = new float[numComponents];
            for( int i=0; i<numComponents; i++ )
            {
                values[i] = 0f;
            }
            if( cs instanceof PDDeviceCMYK )
            {
                values[3] = 1f;
            }
        }
        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.