Package org.apache.batik.bridge

Examples of org.apache.batik.bridge.MissingAttributeException


        // parse the r attribute, (required and must be positive)
        s = svgElement.getAttributeNS(null, ATTR_R);
        float r;
        if (s.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("circle.r.required", null));
        } else {
            r = SVGUtilities.svgToUserSpace(svgElement,
                                            ATTR_R, s,
                                            uctx,
View Full Code Here


                                           in,
                                           filterMap);

        String in2Attr = filterElement.getAttributeNS(null, ATTR_IN2);
        if (in2Attr.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("feComposite.in2.required", null));
        }
        Filter in2;
        in2 = CSSUtilities.getFilterSource(filteredNode,
                                           in2Attr,
View Full Code Here

        // parse the rx attribute, (required and must be positive)
        s = svgElement.getAttributeNS(null, ATTR_RX);
        float rx;
        if (s.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("ellipse.rx.required", null));
        } else {
            rx = SVGUtilities.svgToUserSpace(svgElement,
                                             ATTR_RX, s,
                                             uctx,
                                             UnitProcessor.HORIZONTAL_LENGTH);
            if (rx < 0) {
                throw new IllegalAttributeValueException(
                    Messages.formatMessage("ellipse.rx.negative", null));
            }
        }

        // parse the ry attribute, (required and must be positive)
        s = svgElement.getAttributeNS(null, ATTR_RY);
        float ry;
        if (s.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("ellipse.ry.required", null));
        } else {
            ry = SVGUtilities.svgToUserSpace(svgElement,
                                             ATTR_RY, s,
                                             uctx,
View Full Code Here

        SVGElement svgElement = (SVGElement) filterElement;

        String uriStr = XLinkSupport.getXLinkHref(svgElement);
        if (uriStr == null) {
            throw new MissingAttributeException(
                Messages.formatMessage("feImage.xlinkHref.required", null));
        }

        //
        // feImage's default region is that of the filter chain.
View Full Code Here

            : PathIterator.WIND_EVEN_ODD;

        // parse the points attribute, (required)
        String pts = elt.getAttributeNS(null, ATTR_POINTS);
        if (pts.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("polyline.points.required", null));
        }
        PointsParser p = ctx.getParserFactory().createPointsParser();
        AWTPolylineProducer ph = new AWTPolylineProducer();
        ph.setWindingRule(wr);
View Full Code Here

            : PathIterator.WIND_EVEN_ODD;

        // parse the points attribute, (required)
        String pts = elt.getAttributeNS(null, ATTR_POINTS);
        if (pts.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("polygon.points.required", null));
        }
        PointsParser p = ctx.getParserFactory().createPointsParser();
        AWTPolygonProducer ph = new AWTPolygonProducer();
        ph.setWindingRule(wr);
View Full Code Here

            : PathIterator.WIND_EVEN_ODD;

        // parse the d attribute, (required)
        String d = elt.getAttributeNS(null, ATTR_D);
        if (d.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("path.d.required", null));
        }
        PathParser p = ctx.getParserFactory().createPathParser();
        AWTPathProducer ph = new AWTPathProducer();
        ph.setWindingRule(wr);
View Full Code Here

        // parse the width attribute (required and must be positive)
        s = svgElement.getAttributeNS(null, ATTR_WIDTH);
        float w;
        if (s.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("rect.width.required", null));
        } else {
            w = SVGUtilities.svgToUserSpace(svgElement,
                                            ATTR_WIDTH, s,
                                            uctx,
                                            UnitProcessor.HORIZONTAL_LENGTH);
            if (w < 0) {
                throw new IllegalAttributeValueException(
                    Messages.formatMessage("rect.width.negative", null));
            }
        }

        // parse the height attribute (required and must be positive)
        s = svgElement.getAttributeNS(null, ATTR_HEIGHT);
        float h;
        if (s.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("rect.height.required", null));
        } else {
            h = SVGUtilities.svgToUserSpace(svgElement,
                                            ATTR_HEIGHT, s,
                                            uctx,
View Full Code Here

     * Converts an feFuncXX type attribute into a
     * ComponentTransferFunction type constant
     */
    private static int convertType(Element elt, String value){
        if (value.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("feComponentTransfer.type.required",
                                       new Object[] {elt.getLocalName()}));

        }

View Full Code Here

                                           in,
                                           filterMap);

        String in2Attr = filterElement.getAttributeNS(null, ATTR_IN2);
        if (in2Attr.length() == 0) {
            throw new MissingAttributeException(
                Messages.formatMessage("feBlend.in2.required", null));
        }
        Filter in2;
        in2 = CSSUtilities.getFilterSource(filteredNode,
                                           in2Attr,
View Full Code Here

TOP

Related Classes of org.apache.batik.bridge.MissingAttributeException

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.