Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSFloat


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


     * Constructor.  Defaults all values to 0, 0, 0.
     */
    public PDTristimulus()
    {
        values = new COSArray();
        values.add( new COSFloat( 0.0f ) );
        values.add( new COSFloat( 0.0f ) );
        values.add( new COSFloat( 0.0f ) );
    }
View Full Code Here

    public PDTristimulus( float[] array )
    {
        values = new COSArray();
        for( int i=0; i<array.length && i<3; i++ )
        {
            values.add( new COSFloat( array[i] ) );
        }
    }
View Full Code Here

     *
     * @param x The x value for the tristimulus.
     */
    public void setX( float x )
    {
        values.set( 0, new COSFloat( x ) );
    }
View Full Code Here

     *
     * @param y The y value for the tristimulus.
     */
    public void setY( float y )
    {
        values.set( 1, new COSFloat( y ) );
    }
View Full Code Here

     *
     * @param z The z value for the tristimulus.
     */
    public void setZ( float z )
    {
        values.set( 2, new COSFloat( z ) );
    }
View Full Code Here

        {
            rangeArray = new COSArray();
            stream.getStream().setItem( COSName.getPDFName( "Range" ), rangeArray );
            while( rangeArray.size() < n*2 )
            {
                rangeArray.add( new COSFloat( -100 ) );
                rangeArray.add( new COSFloat( 100 ) );
            }
        }
        return rangeArray;
    }
View Full Code Here

     * @param n The component to set the range for.
     */
    public void setRangeForComponent( PDRange range, int n )
    {
        COSArray rangeArray = getRangeArray( n );
        rangeArray.set( n*2, new COSFloat( range.getMin() ) );
        rangeArray.set( n*2+1, new COSFloat( range.getMax() ) );
    }
View Full Code Here

     */
    public PDFontSetting()
    {
        fontSetting = new COSArray();
        fontSetting.add( null );
        fontSetting.add( new COSFloat( 1 ) );
    }
View Full Code Here

     *
     * @param size The new size of the font.
     */
    public void setFontSize( float size )
    {
        fontSetting.set( 1, new COSFloat( size ) );
    }
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.