public static double extractCgmScale( String cgmText, String cgmLocation ) throws SVGException { Matcher m = cgmScalePattern.matcher( cgmText ); if ( m.find( ) ) { return parseDouble( m.group( 1 ) ); } else { throw new SVGException( "Failed to parse CGM scale: cgm-location = " + cgmLocation ); } }
public static int[] extractCgmBounds( String cgmText, String cgmLocation ) throws SVGException { Matcher m = cgmBoundsPattern.matcher( cgmText ); if ( m.find( ) ) { return ints( parseInt( m.group( 1 ).trim( ) ), parseInt( m.group( 2 ).trim( ) ), parseInt( m.group( 3 ).trim( ) ), parseInt( m.group( 4 ).trim( ) ) ); } else { throw new SVGException( "Failed to parse CGM bounds: cgm-location = " + cgmLocation ); } }
@Override public void pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException { Point2D xPoint = new Point2D.Double(point.getX(), point.getY()); if (viewXform != null) { try { viewXform.inverseTransform(point, xPoint); } catch (NoninvertibleTransformException ex) { throw new SVGException(ex); } } super.pick(xPoint, boundingBox, retVec); }
@Override public void pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException { Point2D xPoint = new Point2D.Double(point.getX(), point.getY()); if (viewXform != null) { try { viewXform.inverseTransform(point, xPoint); } catch (NoninvertibleTransformException ex) { throw new SVGException(ex); } } super.pick(xPoint, boundingBox, retVec); }
/** * Most resources your component will want to access will be resources on your classpath. * This method will interpret the passed string as a path in the classpath and use * Class.getResource() to determine the URI of the SVG. */ public void setSvgResourcePath(String resourcePath) throws SVGException { URI old = this.svgURI; try { svgURI = new URI(getClass().getResource(resourcePath).toString()); //System.err.println("SVGPanel: new URI " + svgURI + " from path " + resourcePath); firePropertyChange("svgURI", old, svgURI); repaint(); } catch (Exception e) { throw new SVGException("Could not resolve path " + resourcePath, e); // svgURI = old; } }
void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException { Point2D xPoint = new Point2D.Double(point.getX(), point.getY()); if (xform != null) { try { xform.inverseTransform(point, xPoint); } catch (NoninvertibleTransformException ex) { throw new SVGException(ex); } } for (Iterator it = children.iterator(); it.hasNext();) { SVGElement ele = (SVGElement)it.next(); if (ele instanceof RenderableElement) { RenderableElement rendEle = (RenderableElement)ele; rendEle.pick(xPoint, boundingBox, retVec); } } }
/** * Most resources your component will want to access will be resources on your classpath. * This method will interpret the passed string as a path in the classpath and use * Class.getResource() to determine the URI of the SVG. */ public void setSvgResourcePath(String resourcePath) throws SVGException { URI old = this.svgURI; try { svgURI = new URI(getClass().getResource(resourcePath).toString()); //System.err.println("SVGPanel: new URI " + svgURI + " from path " + resourcePath); firePropertyChange("svgURI", old, svgURI); repaint(); } catch (Exception e) { throw new SVGException("Could not resolve path " + resourcePath, e); // svgURI = old; } }
void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException { Point2D xPoint = new Point2D.Double(point.getX(), point.getY()); if (xform != null) { try { xform.inverseTransform(point, xPoint); } catch (NoninvertibleTransformException ex) { throw new SVGException(ex); } } for (Iterator it = children.iterator(); it.hasNext();) { SVGElement ele = (SVGElement) it.next(); if (ele instanceof RenderableElement) { RenderableElement rendEle = (RenderableElement) ele; rendEle.pick(xPoint, boundingBox, retVec); } } }
/** * Most resources your component will want to access will be resources on your classpath. * This method will interpret the passed string as a path in the classpath and use * Class.getResource() to determine the URI of the SVG. */ public void setSvgResourcePath(String resourcePath) throws SVGException { URI old = this.svgURI; try { svgURI = new URI(getClass().getResource(resourcePath).toString()); //System.err.println("SVGPanel: new URI " + svgURI + " from path " + resourcePath); firePropertyChange("svgURI", old, svgURI); repaint(); } catch (Exception e) { throw new SVGException("Could not resolve path " + resourcePath, e); // svgURI = old; } }
/** * Most resources your component will want to access will be resources on your classpath. * This method will interpret the passed string as a path in the classpath and use * Class.getResource() to determine the URI of the SVG. */ public void setSvgResourcePath(String resourcePath) throws SVGException { URI old = this.svgURI; try { svgURI = new URI(getClass().getResource(resourcePath).toString()); //System.err.println("SVGPanel: new URI " + svgURI + " from path " + resourcePath); firePropertyChange("svgURI", old, svgURI); repaint(); } catch (Exception e) { throw new SVGException("Could not resolve path " + resourcePath, e); // svgURI = old; } }
@Override void pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException { Point2D xPoint = new Point2D.Double(point.getX(), point.getY()); if (xform != null) { try { xform.inverseTransform(point, xPoint); } catch (NoninvertibleTransformException ex) { throw new SVGException(ex); } } for (SVGElement ele : children) { if (ele instanceof RenderableElement) { RenderableElement rendEle = (RenderableElement) ele; rendEle.pick(xPoint, boundingBox, retVec); } } }
@Override void pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException { Point2D xPoint = new Point2D.Double(point.getX(), point.getY()); if (xform != null) { try { xform.inverseTransform(point, xPoint); } catch (NoninvertibleTransformException ex) { throw new SVGException(ex); } } for (SVGElement ele : children) { if (ele instanceof RenderableElement) { RenderableElement rendEle = (RenderableElement) ele; rendEle.pick(xPoint, boundingBox, retVec); } } }
throw new SVGException("Unknown transform type");
throw new SVGException(e);
throw new SVGException("Could not resolve relative URL in Gradient: " + sty.getStringValue() + ", " + getXMLBase(), e);
throw new SVGException("Could not resolve relative URL in Gradient: " + sty.getStringValue() + ", " + getXMLBase(), e);
throw new SVGException("Could not resolve relative URL in Gradient: " + sty.getStringValue() + ", " + getXMLBase(), e);
throw new SVGException(e);
throw new SVGException(e);