
Untitled
By:
aspektors on
May 29th, 2012 | syntax:
Bash | size: 0.64 KB | hits: 22 | expires: Never
if(OS.USE_CAIRO){
int /*long*/ cairo = OS.gdk_cairo_create(window);
if (cairo == 0) error (SWT.ERROR_NO_HANDLES);
int /*long*/ surface = Cairo.cairo_get_target(cairo);
int /*long*/ stipple = Cairo.cairo_create(surface);
Cairo.cairo_set_source_surface(cairo, Cairo.cairo_get_target(stipple), width, height);
Cairo.cairo_set_operator(stipple,Cairo.CAIRO_OPERATOR_DIFFERENCE);
Cairo.cairo_set_source_rgb(stipple, 0.1, 0.1, 0.1);
Cairo.cairo_rectangle(stipple, x, y, width, height);
Cairo.cairo_fill(stipple);
Cairo.cairo_fill(cairo);
Cairo.cairo_destroy(stipple);
Cairo.cairo_destroy(cairo);
return;
}