Package org.foray.ps

Examples of org.foray.ps.PsArray


    public BigDecimal getStdVW() {
        final PsObject object = getWrappedDictionary().getItem(PsCharStringsDictionary.STD_VW_KEY);
        if (object == null || ! (object instanceof PsArray)) {
            return null;
        }
        final PsArray psArray = (PsArray) object;
        final Object item = psArray.get(0);
        if (! (item instanceof PsNumber)) {
            throw new IllegalStateException("/StdVW expected to be a PsNumber");
        }
        return ((PsNumber) item).getValue();
    }
View Full Code Here


    public int[] getFontBbox() {
        final Object object = this.getWrappedDictionary().getItem(PsFontDictionary.FONT_BBOX_KEY);
        if (! (object instanceof PsArray)) {
            return null;
        }
        final PsArray psarray = (PsArray) object;
        if (psarray.size() != BoundingBox.BBOX_ENTRIES) {
            return null;
        }
        final int[] fontBBox = new int[BoundingBox.BBOX_ENTRIES];
        for (int i = 0; i < psarray.size(); i++) {
            final Object arrayItem = psarray.get(i);
            if (arrayItem instanceof PsInteger) {
                final PsInteger psInteger = (PsInteger) arrayItem;
                final int itemValue = psInteger.intValue();
                fontBBox[i] = itemValue;
            } else {
View Full Code Here

    public BigDecimal getStdVw() {
        final PsObject object = getWrappedDictionary().getItem(PsPrivateDictionary.STD_VW_KEY);
        if (object == null || ! (object instanceof PsArray)) {
            return null;
        }
        final PsArray psArray = (PsArray) object;
        final Object item = psArray.get(0);
        if (! (item instanceof PsNumber)) {
            throw new IllegalStateException("/StdVW expected to be a PsNumber");
        }
        return ((PsNumber) item).getValue();
    }
View Full Code Here

TOP

Related Classes of org.foray.ps.PsArray

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.