Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: aspektors on May 29th, 2012  |  syntax: Bash  |  size: 0.64 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if(OS.USE_CAIRO){
  2.                 int /*long*/ cairo = OS.gdk_cairo_create(window);
  3.                 if (cairo == 0) error (SWT.ERROR_NO_HANDLES);
  4.                
  5.                 int /*long*/ surface = Cairo.cairo_get_target(cairo);
  6.                 int /*long*/ stipple = Cairo.cairo_create(surface);
  7.        
  8.                 Cairo.cairo_set_source_surface(cairo, Cairo.cairo_get_target(stipple), width, height);
  9.                 Cairo.cairo_set_operator(stipple,Cairo.CAIRO_OPERATOR_DIFFERENCE);
  10.                 Cairo.cairo_set_source_rgb(stipple, 0.1, 0.1, 0.1);
  11.  
  12.  
  13.                 Cairo.cairo_rectangle(stipple, x, y, width, height);
  14.                 Cairo.cairo_fill(stipple);
  15.                 Cairo.cairo_fill(cairo);
  16.                 Cairo.cairo_destroy(stipple);
  17.                 Cairo.cairo_destroy(cairo);
  18.                 return;
  19.         }