throws SAXException {                                  }
throws SAXException {  Bounds hatchBounds = this.getBounds();  if (hatchBounds.isValid()) { AttributesImpl attr = new AttributesImpl();   if (isSolid()) { super.setCommonAttributes(attr);  SVGUtils.addAttribute(attr, "fill", "currentColor"); SVGUtils.startElement(handler, SVGConstants.SVG_GROUP, attr);  Iterator i = this.boundaries.iterator();    while (i.hasNext()) { HatchBoundaryLoop loop = (HatchBoundaryLoop) i.next(); this.loopToSVGPath(handler, loop); }  SVGUtils.endElement(handler, SVGConstants.SVG_GROUP);  } else {     attr = new AttributesImpl(); SVGUtils.addAttribute(attr, SVGConstants.XML_ID, SVGUtils .validateID(this.getID())); boolean clipClipPath = false; if (this.hatchStyle < 2) { this.islandToClipPath(handler); clipClipPath = true; SVGUtils.addAttribute(attr, SVGConstants.SVG_ATTRIBUTE_CLIP_PATH, "url(#" + SVGUtils.validateID(this.getID()) + "_clip)"); }  SVGUtils.startElement(handler, SVGConstants.SVG_CLIPPING_PATH, attr);  if (clipClipPath) { this.outermostToSVGPath(handler); } else { Iterator i = this.boundaries.iterator();  while (i.hasNext()) { HatchBoundaryLoop loop = (HatchBoundaryLoop) i.next(); this.loopToSVGPath(handler, loop); } }  SVGUtils.endElement(handler, SVGConstants.SVG_CLIPPING_PATH); DXFHatchPattern pattern = this.doc.getDXFHatchPattern(this .getDXFHatchPatternID());  attr = new AttributesImpl(); SVGUtils.addAttribute(attr, SVGConstants.SVG_ATTRIBUTE_CLIP_PATH, "url(#" + SVGUtils.validateID(this.getID()) + ")"); SVGUtils.startElement(handler, SVGConstants.SVG_GROUP, attr); SVGUtils.startElement(handler, SVGConstants.SVG_TITLE, new AttributesImpl()); SVGUtils.characters(handler, this.getName()); SVGUtils.endElement(handler, SVGConstants.SVG_TITLE); pattern.toSAX(handler, svgContext); SVGUtils.endElement(handler, SVGConstants.SVG_GROUP); } } }
    public void toSAX(ContentHandler handler, Map svgContext)        throws SAXException {//        Iterator i = boundaries.iterator();////        StringBuffer buf = new StringBuffer();////        while (i.hasNext()) {//            HatchBoundaryLoop loop = (HatchBoundaryLoop) i.next();////            Iterator inner = loop.getBoundaryEdgesIterator();////            while (inner.hasNext()) {//                DXFEntity entity = (DXFEntity) inner.next();////                SVGPathBoundaryElement part = (SVGPathBoundaryElement) entity;//                buf.append(' ');//                buf.append(part.getSVGPath());//                buf.append(' ');//            }//        }////        AttributesImpl attr = new AttributesImpl();////        // super.setCommonAttributes(attr);//        SVGUtils.addAttribute(attr, "d", buf.toString());//        SVGUtils.addAttribute(attr, "fill-rule", "evenodd");////        if (isSolid()) {//            SVGUtils.addAttribute(attr, "fill", "currentColor");//        } else {//             SVGUtils.addAttribute(attr, "fill","url(#"+this.getPatternID()+")");//            // SVGUtils.addAttribute(attr, "fill", "blue");//        }////        SVGUtils.emptyElement(handler, SVGConstants.SVG_PATH, attr);    }