Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSFloat


                    {
                        array.add( COSInteger.get( ((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


     * Returns a COS array which represnets this matrix.
     */
    public COSArray toCOSArray()
    {
        COSArray array = new COSArray();
        array.add(new COSFloat(0));
        array.add(new COSFloat(1));
        array.add(new COSFloat(3));
        array.add(new COSFloat(4));
        array.add(new COSFloat(6));
        array.add(new COSFloat(7));
        return array;
    }
View Full Code Here

     * Constructor with an initial range of 0..1.
     */
    public PDRange()
    {
        rangeArray = new COSArray();
        rangeArray.add( new COSFloat( 0.0f ) );
        rangeArray.add( new COSFloat( 1.0f ) );
        startingIndex = 0;
    }
View Full Code Here

     *
     * @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

        matrix = new COSArray();
        double[] values = new double[6];
        transform.getMatrix(values);
        for (double v : values)
        {
            matrix.add(new COSFloat((float)v));
        }
        getCOSDictionary().setItem(COSName.MATRIX, matrix);
    }
View Full Code Here

        COSArray matrix = new COSArray();
        double[] values = new double[6];
        transform.getMatrix(values);
        for (double v : values)
        {
            matrix.add(new COSFloat((float)v));
        }
        getCOSDictionary().setItem(COSName.MATRIX, matrix);
    }
View Full Code Here

        COSArray matrix = new COSArray();
        double[] values = new double[6];
        transform.getMatrix(values);
        for (double v : values)
        {
            matrix.add(new COSFloat((float) v));
        }
        getCOSStream().setItem(COSName.MATRIX, matrix);
    }
View Full Code Here

        COSArray matrix = new COSArray();
        double[] values = new double[6];
        transform.getMatrix(values);
        for (double v : values)
        {
            matrix.add(new COSFloat((float) v));
        }
        getCOSDictionary().setItem(COSName.MATRIX, matrix);
    }
View Full Code Here

        {
            dict.removeItem(key);
        }
        else
        {
            dict.setItem(key, new COSFloat(value));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.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.