Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael5601 committed Dec 3, 2024
1 parent f261e59 commit 46e1744
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.ImageDataProvider;
import org.eclipse.swt.graphics.ImageFileNameProvider;
import org.eclipse.swt.graphics.SVGRasterizerServiceLoader;
import org.eclipse.swt.graphics.SVGRasterizerRegistry;

/**
* An ImageDescriptor that gets its information from a URL. This class is not
Expand All @@ -61,7 +61,7 @@ public URLImageFileNameProvider(String url) {
public String getImagePath(int zoom) {
URL tempURL = getURL(url);
if (tempURL != null) {
ISVGRasterizer rasterizer = SVGRasterizerServiceLoader.getRasterizer();
ISVGRasterizer rasterizer = SVGRasterizerRegistry.getRasterizer();
if (rasterizer != null) {
try (InputStream in = getStream(tempURL)) {
if (rasterizer.isSVGFile(in)) {
Expand Down Expand Up @@ -151,7 +151,7 @@ public ImageData getImageData(int zoom) {
private static ImageData getImageData(String url, int zoom) {
URL tempURL = getURL(url);
if (tempURL != null) {
ISVGRasterizer rasterizer = SVGRasterizerServiceLoader.getRasterizer();
ISVGRasterizer rasterizer = SVGRasterizerRegistry.getRasterizer();
if (rasterizer != null) {
try {
try (InputStream in = getStream(tempURL)) {
Expand Down

0 comments on commit 46e1744

Please sign in to comment.