private void viewerResized() { width = getSize().x; height = getSize().y; logger.debug("Tamaño del viewer: " + width + "x" + height); if (svgImage != null && !svgImage.isDisposed()) svgImage.dispose(); if (offscreenImage != null && !offscreenImage.isDisposed()) { offscreenImage.dispose(); } offscreenImage = new Image(getDisplay(), width, height); // Crea el raster SVG TinyPixbuf buffer = new TinyPixbuf(width, height); raster = new SVGRaster(buffer); imageProducer = new ImageProducer(raster); imageProducer.setConsumer(this); raster.setSVGImageProducer(imageProducer); // Antialiasing raster.setAntialiased(antialiased); // Poner fondo transparente raster.setBackground(0x00FFFFFF); // Avisar al manejador de eventos de que el tamaño ha cambiado if (mouseHandler != null) { mouseHandler.viewerResized(); } // Cargar el documento pendiente, si existe if (pendingSVG != null) { loadSVGUrl(pendingSVG); pendingSVG = null; } else { if (currentSVG != null) { loadSVGUrl(currentSVG); } } }