Examples of evalPercentage()


Examples of org.foray.fotree.value.PropertyValue.evalPercentage()

            }
            if (length.canEvalLength()) {
                return length.evalLength(fobj.traitFontSize(context));
            }
            if (length.canEvalPercentage()) {
                final float percent = length.evalPercentage();
                return Math.round(context.ipdAncestorBlockOrRa() * percent
                        / WKConstants.PERCENT_CONVERSION);
            }
            throw this.unexpectedRetrieval();
        }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.evalPercentage()

                final SimplePageMaster spm = (SimplePageMaster) fobj;
                base = spm.traitPageHeight();
            } else {
                base = context.widthContainingBlock();
            }
            final float percent = value.evalPercentage();
            return Math.round(base * percent / WKConstants.PERCENT_CONVERSION);
        }
        if (value.canEvalLength()) {
            return this.convertValueToLength(value, fobj, context);
        }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.evalPercentage()

        for (int i = 0; i < collection.getCount(); i++) {
            final PropertyValue pv = collection.getItem(i);
            if (pv.canEvalKeyword()) {
                returnValue[i] = java.lang.Float.POSITIVE_INFINITY;
            } else if (pv.canEvalPercentage()) {
                returnValue[i] = pv.evalPercentage();
            }
        }
        return returnValue;
    }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.evalPercentage()

        final PropertyValue pv = standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalPercentage()) {
            if (pv.evalPercentage() < 0) {
                throw unexpectedValue(value, fobj);
            }
            return pv;
        }
        if (pv.canEvalNumeric()) {
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.evalPercentage()

                final SimplePageMaster spm = (SimplePageMaster) fobj;
                base = spm.traitPageHeight();
            } else {
                base = context.widthContainingBlock();
            }
            final float percent = value.evalPercentage();
            return Math.round(base * percent / WKConstants.PERCENT_CONVERSION);
        }
        if (value.canEvalLength()) {
            return this.convertValueToLength(value, fobj, context);
        }
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.