3535import org .eclipse .swt .SWT ;
3636import org .eclipse .swt .SWTException ;
3737import org .eclipse .swt .graphics .Device ;
38- import org .eclipse .swt .graphics .SVGRasterizer ;
3938import org .eclipse .swt .graphics .Image ;
4039import org .eclipse .swt .graphics .ImageData ;
4140import org .eclipse .swt .graphics .ImageDataProvider ;
4241import org .eclipse .swt .graphics .ImageFileNameProvider ;
42+ import org .eclipse .swt .graphics .SVGRasterizer ;
4343import org .eclipse .swt .graphics .SVGRasterizerRegistry ;
44- import org .eclipse .swt .graphics .SVGUtil ;
4544
4645/**
4746 * An ImageDescriptor that gets its information from a URL. This class is not
@@ -65,7 +64,7 @@ public String getImagePath(int zoom) {
6564 SVGRasterizer rasterizer = SVGRasterizerRegistry .getRasterizer ();
6665 if (rasterizer != null ) {
6766 try (InputStream in = getStream (tempURL )) {
68- if (SVGUtil .isSVGFile (in )) {
67+ if (rasterizer .isSVGFile (in )) {
6968 return getFilePath (tempURL , false );
7069 }
7170 } catch (IOException e ) {
@@ -154,11 +153,9 @@ private static ImageData getImageData(String url, int zoom) {
154153 if (tempURL != null ) {
155154 SVGRasterizer rasterizer = SVGRasterizerRegistry .getRasterizer ();
156155 if (rasterizer != null ) {
157- try {
158- try (InputStream in = getStream (tempURL )) {
159- if (SVGUtil .isSVGFile (in )) {
160- return getImageData (tempURL , zoom );
161- }
156+ try (InputStream in = getStream (tempURL )) {
157+ if (rasterizer .isSVGFile (in )) {
158+ return getImageData (tempURL , zoom );
162159 }
163160 } catch (IOException e ) {
164161 // ignore.
0 commit comments