Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSArray.toFloatArray()


        // get background values if available
        COSArray bg = shadingType4.getBackground();
        if (bg != null)
        {
            background = bg.toFloatArray();
        }

        //TODO missing: BBox, AntiAlias (p. 305 in 1.7 spec)
        // p318:
        //  reading in sequence from higher-order to lower-order bit positions
View Full Code Here


        triangleList = new ArrayList<ShadedTriangle>();
        LOG.debug("Background: " + shading.getBackground());
        COSArray bg = shading.getBackground();
        if (bg != null)
        {
            background = bg.toFloatArray();
            rgbBackground = convertToRGB(background);
        }
    }

    /**
 
View Full Code Here

        // get background values if available
        COSArray bg = shading.getBackground();
        if (bg != null)
        {
            background = bg.toFloatArray();
            rgbBackground = convertToRGB(background);
        }
        longestDistance = getLongestDis();
        colorTable = calcColorTable();
    }
View Full Code Here

    {
        Color retval = null;
        COSArray array = (COSArray)annot.getDictionaryObject( "color" );
        if( array != null )
        {
            float[] rgb = array.toFloatArray();
            if( rgb.length >=3 )
            {
                retval = new Color( rgb[0], rgb[1], rgb[2] );
            }
        }
View Full Code Here

     *         default user space.
     */
    public float[] getLine()
    {
        COSArray l = (COSArray) getDictionary().getDictionaryObject( "L" );
        return l.toFloatArray();
    }

    /**
     * This will set the line ending style for the start point,
     * see the LE_ constants for the possible values.
View Full Code Here

    public float[] getCoordSystemOrigin()
    {
        COSArray o = (COSArray)this.getDictionary().getDictionaryObject("O");
        if (o != null)
        {
            return o.toFloatArray();
        }
        return null;
    }

    /**
 
View Full Code Here

    public float[] getQuadPoints()
    {
        COSArray quadPoints = (COSArray) getDictionary().getDictionaryObject( "QuadPoints" );
        if (quadPoints != null)
        {
            return quadPoints.toFloatArray();
        }
        else
        {
            return null; // Should never happen as this is a required item
        }
View Full Code Here

    {
        float retval = 0.f;
        COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
        if( array != null )
        {
            retval = array.toFloatArray()[0];
        }

        return retval;
    }
View Full Code Here

    {
        float retval = 0.f;
        COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
        if( array != null )
        {
            retval = array.toFloatArray()[1];
        }
        return retval;
    }

}
View Full Code Here

    public float[] getQuadPoints()
    {
        COSArray quadPoints = (COSArray) getDictionary().getDictionaryObject( "QuadPoints" );
        if (quadPoints != null)
        {
            return quadPoints.toFloatArray();
        }
        else
        {
            return null; // Should never happen as this is a required item
        }
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.