public Pixmap (FileHandle file) { GwtFileHandle gwtFile = (GwtFileHandle)file; ImageElement img = gwtFile.preloader.images.get(file.path()); if (img == null) throw new GdxRuntimeException("Couldn't load image '" + file.path() + "', file does not exist"); create(img.getWidth(), img.getHeight(), Format.RGBA8888); context.setGlobalCompositeOperation(Composite.COPY); context.drawImage(img, 0, 0); context.setGlobalCompositeOperation(getComposite()); }
@Override public FileHandle resolve (String fileName) { Resolution bestDesc = choose(descriptors); FileHandle originalHandle = new GwtFileHandle(fileName); FileHandle handle = baseResolver.resolve(resolve(originalHandle, bestDesc.suffix)); if (!handle.exists()) handle = baseResolver.resolve(fileName); return handle; }