35
35
import org .eclipse .swt .SWT ;
36
36
import org .eclipse .swt .SWTException ;
37
37
import org .eclipse .swt .graphics .Device ;
38
- import org .eclipse .swt .graphics .SVGRasterizer ;
39
38
import org .eclipse .swt .graphics .Image ;
40
39
import org .eclipse .swt .graphics .ImageData ;
41
40
import org .eclipse .swt .graphics .ImageDataProvider ;
42
41
import org .eclipse .swt .graphics .ImageFileNameProvider ;
42
+ import org .eclipse .swt .graphics .SVGRasterizer ;
43
43
import org .eclipse .swt .graphics .SVGRasterizerRegistry ;
44
- import org .eclipse .swt .graphics .SVGUtil ;
45
44
46
45
/**
47
46
* An ImageDescriptor that gets its information from a URL. This class is not
@@ -65,7 +64,7 @@ public String getImagePath(int zoom) {
65
64
SVGRasterizer rasterizer = SVGRasterizerRegistry .getRasterizer ();
66
65
if (rasterizer != null ) {
67
66
try (InputStream in = getStream (tempURL )) {
68
- if (SVGUtil .isSVGFile (in )) {
67
+ if (rasterizer .isSVGFile (in )) {
69
68
return getFilePath (tempURL , false );
70
69
}
71
70
} catch (IOException e ) {
@@ -154,11 +153,9 @@ private static ImageData getImageData(String url, int zoom) {
154
153
if (tempURL != null ) {
155
154
SVGRasterizer rasterizer = SVGRasterizerRegistry .getRasterizer ();
156
155
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 );
162
159
}
163
160
} catch (IOException e ) {
164
161
// ignore.
0 commit comments