Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSFloat


        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( COSInteger.ZERO );
            array.add( COSInteger.ZERO );
            array.add( new COSFloat( 0.001f ) );
            array.add( COSInteger.ZERO );
            array.add( COSInteger.ZERO );
        }
        matrix = new PDMatrix(array);
View Full Code Here


    {
        COSArray wp = (COSArray)dictionary.getDictionaryObject(COSName.WHITE_POINT);
        if(wp == null)
        {
            wp = new COSArray();
            wp.add(new COSFloat(1.0f));
            wp.add(new COSFloat(1.0f));
            wp.add(new COSFloat(1.0f));
        }
        return new PDTristimulus(wp);
    }
View Full Code Here

    {
        COSArray bp = (COSArray)dictionary.getDictionaryObject(COSName.BLACK_POINT);
        if(bp == null)
        {
            bp = new COSArray();
            bp.add(new COSFloat(0.0f));
            bp.add(new COSFloat(0.0f));
            bp.add(new COSFloat(0.0f));
        }
        return new PDTristimulus(bp);
    }
View Full Code Here

     * @return the new range array.
     */
    private COSArray getDefaultRangeArray()
    {
        COSArray range = new COSArray();
        range.add(new COSFloat(-100));
        range.add(new COSFloat(100));
        range.add(new COSFloat(-100));
        range.add(new COSFloat(100));
        return range;
    }
View Full Code Here

            rangeArray = getDefaultRangeArray();
        }
        //if null then reset to defaults
        if(range == null)
        {
            rangeArray.set(0, new COSFloat(-100));
            rangeArray.set(1, new COSFloat(100));
        }
        else
        {
            rangeArray.set(0, new COSFloat(range.getMin()));
            rangeArray.set(1, new COSFloat(range.getMax()));
        }
        dictionary.setItem(COSName.RANGE, rangeArray);
        initialColor = null;
    }
View Full Code Here

            rangeArray = getDefaultRangeArray();
        }
        //if null then reset to defaults
        if(range == null)
        {
            rangeArray.set(2, new COSFloat(-100));
            rangeArray.set(3, new COSFloat(100));
        }
        else
        {
            rangeArray.set(2, new COSFloat(range.getMin()));
            rangeArray.set(3, new COSFloat(range.getMax()));
        }
        dictionary.setItem(COSName.RANGE, rangeArray);
        initialColor = null;
    }
View Full Code Here

     * Defaults all values to 0, 0, 0.
     */
    public PDGamma()
    {
        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

     * Sets the r value of the tristimulus.
     * @param r the r value for the tristimulus
     */
    public void setR(float r)
    {
        values.set(0, new COSFloat(r));
    }
View Full Code Here

     * Sets the g value of the tristimulus.
     * @param g the g value for the tristimulus
     */
    public void setG(float g)
    {
        values.set(1, new COSFloat(g));
    }
View Full Code Here

     * Sets the b value of the tristimulus.
     * @param b he b value for the tristimulus
     */
    public void setB(float b)
    {
        values.set(2, new COSFloat(b));
    }
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.