Examples of Declarations


Examples of org.apache.fop.fo.pagination.Declarations

    /** {@inheritDoc} */
    public Property eval(Property[] args,
                         PropertyInfo pInfo) throws PropertyException {
        // Map color profile NCNAME to src from declarations/color-profile element
        String colorProfileName = args[3].getString();
        Declarations decls = pInfo.getFO().getRoot().getDeclarations();
        ColorProfile cp = null;
        if (decls == null) {
            //function used in a color-specification
            //on a FO occurring:
            //a) before the fo:declarations,
            //b) or in a document without fo:declarations?
            //=> return the sRGB fallback
            if (!ColorUtil.isPseudoProfile(colorProfileName)) {
                Property[] rgbArgs = new Property[3];
                System.arraycopy(args, 0, rgbArgs, 0, 3);
                return new RGBColorFunction().eval(rgbArgs, pInfo);
            }
        } else {
            cp = decls.getColorProfile(colorProfileName);
            if (cp == null) {
                if (!ColorUtil.isPseudoProfile(colorProfileName)) {
                    PropertyException pe = new PropertyException("The " + colorProfileName
                            + " color profile was not declared");
                    pe.setPropertyInfo(pInfo);
View Full Code Here

Examples of org.apache.fop.fo.pagination.Declarations

    /** {@inheritDoc} */
    public Property eval(Property[] args, PropertyInfo pInfo) throws PropertyException {
        // Map color profile NCNAME to src from declarations/color-profile element
        String colorProfileName = args[3].getString();
        Declarations decls = (pInfo.getFO() != null
                ? pInfo.getFO().getRoot().getDeclarations()
                : null);
        ColorProfile cp = null;
        if (decls == null) {
            //function used in a color-specification
            //on a FO occurring:
            //a) before the fo:declarations,
            //b) or in a document without fo:declarations?
            //=> return the sRGB fallback
            if (!ColorUtil.isPseudoProfile(colorProfileName)) {
                Property[] rgbArgs = new Property[3];
                System.arraycopy(args, 0, rgbArgs, 0, 3);
                return new RGBColorFunction().eval(rgbArgs, pInfo);
            }
        } else {
            cp = decls.getColorProfile(colorProfileName);
            if (cp == null) {
                if (!ColorUtil.isPseudoProfile(colorProfileName)) {
                    PropertyException pe = new PropertyException("The " + colorProfileName
                            + " color profile was not declared");
                    pe.setPropertyInfo(pInfo);
View Full Code Here

Examples of org.apache.fop.fo.pagination.Declarations

    public Property eval(Property[] args, PropertyInfo pInfo) throws PropertyException {
        // Map color profile NCNAME to src from declarations/color-profile element
        String colorProfileName = args[3].getString();
        String colorName = args[4].getString();

        Declarations decls = (pInfo.getFO() != null
                ? pInfo.getFO().getRoot().getDeclarations()
                : null);
        ColorProfile cp = null;
        if (decls != null) {
            cp = decls.getColorProfile(colorProfileName);
        }
        if (cp == null) {
            PropertyException pe = new PropertyException("The " + colorProfileName
                    + " color profile was not declared");
            pe.setPropertyInfo(pInfo);
View Full Code Here

Examples of org.apache.fop.fo.pagination.Declarations

                         PropertyInfo pInfo) throws PropertyException {
        StringBuffer sb = new StringBuffer();

        // Map color profile NCNAME to src from declarations/color-profile element
        String colorProfileName = args[3].getString();
        Declarations decls = pInfo.getFO().getRoot().getDeclarations();
        ColorProfile cp = decls.getColorProfile(colorProfileName);
        if (cp == null) {
            PropertyException pe = new PropertyException("The " + colorProfileName
                    + " color profile was not declared");
            pe.setPropertyInfo(pInfo);
            throw pe;
View Full Code Here

Examples of org.foray.fotree.fo.obj.Declarations

        }
        case CONDITIONAL_PAGE_MASTER_REFERENCE: {
            return new ConditionalPageMasterReference(parent, propertyList);
        }
        case DECLARATIONS: {
            return new Declarations(parent, propertyList);
        }
        case EXTERNAL_GRAPHIC: {
            return new ExternalGraphic(parent, propertyList);
        }
        case FLOAT: {
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.