/** * Prevents uninitialized instances from being created outside the package. */ Image (Device device) { super(device); currentDeviceZoom = DPIUtil.getDeviceZoom (); }
Image(Device device) { super(device); currentDeviceZoom = DPIUtil.getDeviceZoom(); }
Image(Device device) { super(device); currentDeviceZoom = DPIUtil.getDeviceZoom(); }
Image(Device device) { super(device); currentDeviceZoom = DPIUtil.getDeviceZoom(); }
super(device); Point size = DPIUtil.autoScaleUp(new Point(width, height)); currentDeviceZoom = DPIUtil.getDeviceZoom(); init(size.x, size.y); init();
super(device); Point size = DPIUtil.autoScaleUp(new Point(width, height)); currentDeviceZoom = DPIUtil.getDeviceZoom(); init(size.x, size.y); init();
super(device); if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); currentDeviceZoom = DPIUtil.getDeviceZoom (); data = DPIUtil.autoScaleUp (device, data); init(data);
super(device); if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); currentDeviceZoom = DPIUtil.getDeviceZoom(); data = DPIUtil.autoScaleUp (device, data); init(data);
super(device); if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); currentDeviceZoom = DPIUtil.getDeviceZoom(); data = DPIUtil.autoScaleUp (device, data); init(data);
super(device); if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); currentDeviceZoom = DPIUtil.getDeviceZoom(); data = DPIUtil.autoScaleUp (device, data); init(data);
super(device); if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); currentDeviceZoom = DPIUtil.getDeviceZoom(); Rectangle bounds1 = DPIUtil.autoScaleUp (bounds); init(bounds1.width, bounds1.height);
super(device); if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); currentDeviceZoom = DPIUtil.getDeviceZoom(); Rectangle bounds1 = DPIUtil.autoScaleUp (bounds); init(bounds1.width, bounds1.height);
super(device); if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); currentDeviceZoom = DPIUtil.getDeviceZoom(); Rectangle bounds1 = DPIUtil.autoScaleUp (bounds); init(bounds1.width, bounds1.height);
currentDeviceZoom = DPIUtil.getDeviceZoom(); data = DPIUtil.autoScaleUp (device, data); init(data);
SWT.error(SWT.ERROR_INVALID_ARGUMENT); currentDeviceZoom = DPIUtil.getDeviceZoom(); source = DPIUtil.autoScaleUp (device, source); mask = DPIUtil.autoScaleUp (device, mask);
SWT.error(SWT.ERROR_INVALID_ARGUMENT); currentDeviceZoom = DPIUtil.getDeviceZoom(); source = DPIUtil.autoScaleUp (device, source); mask = DPIUtil.autoScaleUp (device, mask);
Image createButtonImage(Display display, int button) { GC tempGC = new GC (this); Point size = renderer.computeSize(button, SWT.NONE, tempGC, SWT.DEFAULT, SWT.DEFAULT); tempGC.dispose(); Rectangle trim = renderer.computeTrim(button, SWT.NONE, 0, 0, 0, 0); Image image = new Image (display, size.x - trim.width, size.y - trim.height); GC gc = new GC (image); RGB transparent; if (button == CTabFolderRenderer.PART_CHEVRON_BUTTON) { transparent = new RGB(0xFF, 0xFF, 0xFF); } else { transparent = new RGB(0xFD, 0, 0); } Color transColor = new Color(display, transparent); gc.setBackground(transColor); gc.fillRectangle(image.getBounds()); renderer.draw(button, SWT.NONE, new Rectangle(trim.x, trim.y, size.x, size.y), gc); gc.dispose (); transColor.dispose(); final ImageData imageData = image.getImageDataAtCurrentZoom(); imageData.transparentPixel = imageData.palette.getPixel(transparent); image.dispose(); image = new Image(display, new AutoScaleImageDataProvider(display, imageData, DPIUtil.getDeviceZoom())); return image; } void createItem (CTabItem item, int index) {
Image createButtonImage(Display display, int button) { GC tempGC = new GC (this); Point size = renderer.computeSize(button, SWT.NONE, tempGC, SWT.DEFAULT, SWT.DEFAULT); tempGC.dispose(); Rectangle trim = renderer.computeTrim(button, SWT.NONE, 0, 0, 0, 0); Image image = new Image (display, size.x - trim.width, size.y - trim.height); GC gc = new GC (image); RGB transparent; if (button == CTabFolderRenderer.PART_CHEVRON_BUTTON) { transparent = new RGB(0xFF, 0xFF, 0xFF); } else { transparent = new RGB(0xF7, 0, 0); } Color transColor = new Color(display, transparent); gc.setBackground(transColor); gc.fillRectangle(image.getBounds()); renderer.draw(button, SWT.NONE, new Rectangle(trim.x, trim.y, size.x, size.y), gc); gc.dispose (); transColor.dispose(); final ImageData imageData = image.getImageDataAtCurrentZoom(); imageData.transparentPixel = imageData.palette.getPixel(transparent); image.dispose(); image = new Image(display, new AutoScaleImageDataProvider(display, imageData, DPIUtil.getDeviceZoom())); return image; } void createItem (CTabItem item, int index) {
Image createButtonImage(Display display, int button) { GC tempGC = new GC (this); Point size = renderer.computeSize(button, SWT.NONE, tempGC, SWT.DEFAULT, SWT.DEFAULT); tempGC.dispose(); Rectangle trim = renderer.computeTrim(button, SWT.NONE, 0, 0, 0, 0); Image image = new Image (display, size.x - trim.width, size.y - trim.height); GC gc = new GC (image); RGB transparent; if (button == CTabFolderRenderer.PART_CHEVRON_BUTTON) { transparent = new RGB(0xFF, 0xFF, 0xFF); } else { transparent = new RGB(0xF7, 0, 0); } Color transColor = new Color(display, transparent); gc.setBackground(transColor); gc.fillRectangle(image.getBounds()); renderer.draw(button, SWT.NONE, new Rectangle(trim.x, trim.y, size.x, size.y), gc); gc.dispose (); transColor.dispose(); final ImageData imageData = image.getImageDataAtCurrentZoom(); imageData.transparentPixel = imageData.palette.getPixel(transparent); image.dispose(); image = new Image(display, new AutoScaleImageDataProvider(display, imageData, DPIUtil.getDeviceZoom())); return image; } void createItem (CTabItem item, int index) {
Image createButtonImage(Display display, int button) { GC tempGC = new GC (this); Point size = renderer.computeSize(button, SWT.NONE, tempGC, SWT.DEFAULT, SWT.DEFAULT); tempGC.dispose(); Rectangle trim = renderer.computeTrim(button, SWT.NONE, 0, 0, 0, 0); Image image = new Image (display, size.x - trim.width, size.y - trim.height); GC gc = new GC (image); RGB transparent; if (button == CTabFolderRenderer.PART_CHEVRON_BUTTON) { transparent = new RGB(0xFF, 0xFF, 0xFF); } else { transparent = new RGB(0xF7, 0, 0); } Color transColor = new Color(display, transparent); gc.setBackground(transColor); gc.fillRectangle(image.getBounds()); renderer.draw(button, SWT.NONE, new Rectangle(trim.x, trim.y, size.x, size.y), gc); gc.dispose (); transColor.dispose(); final ImageData imageData = image.getImageDataAtCurrentZoom(); imageData.transparentPixel = imageData.palette.getPixel(transparent); image.dispose(); image = new Image(display, new AutoScaleImageDataProvider(display, imageData, DPIUtil.getDeviceZoom())); return image; } void createItem (CTabItem item, int index) {