Examples of CSSPrimitiveValue


Examples of org.w3c.dom.css.CSSPrimitiveValue

     * @param v the value to convert
     * @param d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH
     * @param ctx the context
     */
    protected static float emsToPixels(float v, short d, Context ctx) {
        CSSPrimitiveValue fontSize = ctx.getFontSize();
        short type = fontSize.getPrimitiveType();
        switch (type) {
            case CSSPrimitiveValue.CSS_IDENT:
                float fs = ctx.getMediumFontSize();
                fs = TextUtilities.parseFontSize(fontSize.getStringValue(), fs);
                return v * cssToUserSpace(fs,
                                          CSSPrimitiveValue.CSS_PT,
                                          d,
                                          ctx);
            default:
                return v * cssToUserSpace(fontSize.getFloatValue(type),
                                          type,
                                          d,
                                          ctx.getParentElementContext());
        }
    }
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.