comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/graphics/Image.d @ 113:fb3aa8075988

D2 support for the linux port.
author Jacob Carlborg <doob@me.com>
date Wed, 06 Apr 2011 21:57:23 +0200
parents 70388b0e6dad
children
comparison
equal deleted inserted replaced
112:9f4c18c268b2 113:fb3aa8075988
122 * platforms and should never be accessed from application code. 122 * platforms and should never be accessed from application code.
123 * </p> 123 * </p>
124 */ 124 */
125 public GdkDrawable* mask; 125 public GdkDrawable* mask;
126 126
127 cairo_surface_t* surface; 127 org.eclipse.swt.internal.gtk.OS.cairo_surface_t* surface;
128 cairo_surface_t* surfaceData; 128 org.eclipse.swt.internal.gtk.OS.cairo_surface_t* surfaceData;
129 129
130 /** 130 /**
131 * specifies the transparent pixel 131 * specifies the transparent pixel
132 */ 132 */
133 int transparentPixel = -1; 133 int transparentPixel = -1;
737 } 737 }
738 OS.memmove (offset, line.ptr, stride); 738 OS.memmove (offset, line.ptr, stride);
739 offset += stride; 739 offset += stride;
740 } 740 }
741 } 741 }
742 surfaceData = cast(cairo_surface_t*) OS.g_malloc(stride * height); 742 surfaceData = cast(org.eclipse.swt.internal.gtk.OS.cairo_surface_t*) OS.g_malloc(stride * height);
743 OS.memmove(surfaceData, pixels, stride * height); 743 OS.memmove(surfaceData, pixels, stride * height);
744 surface = Cairo.cairo_image_surface_create_for_data(cast(char*)surfaceData, Cairo.CAIRO_FORMAT_ARGB32, width, height, stride); 744 surface = Cairo.cairo_image_surface_create_for_data(cast(char*)surfaceData, Cairo.CAIRO_FORMAT_ARGB32, width, height, stride);
745 OS.g_object_unref(pixbuf); 745 OS.g_object_unref(pixbuf);
746 } else { 746 } else {
747 auto xDisplay = OS.GDK_DISPLAY(); 747 auto xDisplay = OS.GDK_DISPLAY();