Package org.apache.fop.fo.pagination

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
            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) {
                PropertyException pe = new PropertyException("The " + colorProfileName
                        + " color profile was not declared");
                pe.setPropertyInfo(pInfo);
                throw pe;
View Full Code Here


    /** {@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

    /** {@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

    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

                         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

TOP

Related Classes of org.apache.fop.fo.pagination.Declarations

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.