Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSFloat


     *
     * @param min The new minimum for the range.
     */
    public void setMin( float min )
    {
        rangeArray.set( startingIndex*2, new COSFloat( min ) );
    }
View Full Code Here


     *
     * @param max The new maximum for the range.
     */
    public void setMax( float max )
    {
        rangeArray.set( startingIndex*2+1, new COSFloat( max ) );
    }
View Full Code Here

        }
        for( int i=encode.size(); i<paramNum*2+1; i++)
        {
            encode.add( COSNull.NULL );
        }
        encode.set( paramNum*2, new COSFloat( range.getMin() ) );
        encode.set( paramNum*2+1, new COSFloat( range.getMax() ) );
    }
View Full Code Here

        }
        for( int i=encode.size(); i<paramNum*2+1; i++)
        {
            encode.add( COSNull.NULL );
        }
        encode.set( paramNum*2, new COSFloat( range.getMin() ) );
        encode.set( paramNum*2+1, new COSFloat( range.getMax() ) );
    }
View Full Code Here

                    {
                        array.add( new COSInteger( ((Number)next).longValue() ) );
                    }
                    else if( next instanceof Float || next instanceof Double )
                    {
                        array.add( new COSFloat( ((Number)next).floatValue() ) );
                    }
                    else if( next instanceof COSObjectable )
                    {
                        COSObjectable object = (COSObjectable)next;
                        array.add( object.getCOSObject() );
View Full Code Here

     */
    public void process(PDFOperator operator, List arguments) throws IOException
    {
        //move to start of next text line
        ArrayList args = new ArrayList();
        args.add(new COSFloat(0.0f));
        // this must be -leading instead of just leading as written in the
        // specification (p.369) the acrobat reader seems to implement it the same way
        args.add(new COSFloat(-1*context.getGraphicsState().getTextState().getLeading()));
        // use Td instead of repeating code
        context.processOperator("Td", args);
       
    }
View Full Code Here

        PDMatrix matrix = null;
        COSArray array = (COSArray)font.getDictionaryObject( COSName.FONT_MATRIX );
        if( array == null )
        {
            array = new COSArray();
            array.add( new COSFloat( 0.001f ) );
            array.add( COSNumber.ZERO );
            array.add( COSNumber.ZERO );
            array.add( new COSFloat( 0.001f ) );
            array.add( COSNumber.ZERO );
            array.add( COSNumber.ZERO );
        }
        matrix = new PDMatrix(array);
       
View Full Code Here

        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

     * @param textColor The text color for this node.
     */
    public void setTextColor( Color textColor )
    {
        COSArray array = new COSArray();
        array.add( new COSFloat( textColor.getRed()/255f));
        array.add( new COSFloat( textColor.getGreen()/255f));
        array.add( new COSFloat( textColor.getBlue()/255f));
        node.setItem( "C", array );
    }
View Full Code Here

                                drawnString.reset();
                                drawnString.append( apValue.getBytes() );
                            }
                        }
                        int setFontIndex = tokens.indexOf( PDFOperator.getOperator( "Tf" ));
                        tokens.set( setFontIndex-1, new COSFloat( fontSize ) );
                        if( foundString )
                        {
                            writer.writeTokens( tokens );  
                        }
                        else
View Full Code Here

TOP

Related Classes of org.pdfbox.cos.COSFloat

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.