/** * Invokes platform specific functionality to allocate a new image. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public * API for <code>Image</code>. It is marked public only so that it * can be shared within the packages provided by SWT. It is not * available on all platforms, and should never be called from * application code. * </p> * * @param device the device on which to allocate the color * @param type the type of the image (<code>SWT.BITMAP</code> or <code>SWT.ICON</code>) * @param imageHandle the OS handle for the image * @param mask the OS handle for the image mask * * @noreference This method is not intended to be referenced by clients. */ public static Image gtk_new(Device device, int type, int /*long*/ imageHandle, int /*long*/ mask) { Image image = new Image(device); image.type = type; if (OS.GTK3) { image.surface = imageHandle; } else { image.pixmap = imageHandle; if (OS.USE_CAIRO) image.createSurface(); } image.mask = mask; return image; }
/** * Invokes platform specific functionality to allocate a new image. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public * API for <code>Image</code>. It is marked public only so that it * can be shared within the packages provided by SWT. It is not * available on all platforms, and should never be called from * application code. * </p> * * @param device the device on which to allocate the color * @param type the type of the image (<code>SWT.BITMAP</code> or <code>SWT.ICON</code>) * @param imageHandle the OS handle for the image * @param mask the OS handle for the image mask * * @noreference This method is not intended to be referenced by clients. */ public static Image gtk_new(Device device, int type, int /*long*/ imageHandle, int /*long*/ mask) { Image image = new Image(device); image.type = type; if (OS.GTK3) { image.surface = imageHandle; } else { image.pixmap = imageHandle; if (OS.USE_CAIRO) image.createSurface(); } image.mask = mask; return image; }
/** * Invokes platform specific functionality to allocate a new image. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public * API for <code>Image</code>. It is marked public only so that it * can be shared within the packages provided by SWT. It is not * available on all platforms, and should never be called from * application code. * </p> * * @param device the device on which to allocate the color * @param type the type of the image (<code>SWT.BITMAP</code> or <code>SWT.ICON</code>) * @param imageHandle the OS handle for the image * @param mask the OS handle for the image mask * * @noreference This method is not intended to be referenced by clients. */ public static Image gtk_new(Device device, int type, long /*int*/ imageHandle, long /*int*/ mask) { Image image = new Image(device); image.type = type; if (OS.GTK3) { image.surface = imageHandle; } else { image.pixmap = imageHandle; if (OS.USE_CAIRO) image.createSurface(); } image.mask = mask; return image; }
if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.device.checkCairo(); image.createSurface(); handle = Cairo.cairo_pattern_create_for_surface(image.surface); if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.device.checkCairo(); image.createSurface(); handle = Cairo.cairo_pattern_create_for_surface(image.surface); if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.device.checkCairo(); image.createSurface(); handle = Cairo.cairo_pattern_create_for_surface(image.surface); if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (cairo != 0) { if (data.alpha != 0) { srcImage.createSurface(); Cairo.cairo_save(cairo); if ((data.style & SWT.MIRRORED) != 0) {
if (cairo != 0) { if (data.alpha != 0) { srcImage.createSurface(); Cairo.cairo_save(cairo); if ((data.style & SWT.MIRRORED) != 0) {
if (cairo != 0) { if (data.alpha != 0) { srcImage.createSurface(); Cairo.cairo_save(cairo); if ((data.style & SWT.MIRRORED) != 0) {