Author: manolo
Date: 2010-06-18 06:39:27 -0700 (Fri, 18 Jun 2010)
New Revision: 7649
Log:
Removed commented out code

Modified:
   branches/branch-1.3/src/Fl_Image.cxx

Modified: branches/branch-1.3/src/Fl_Image.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Image.cxx        2010-06-18 10:11:09 UTC (rev 
7648)
+++ branches/branch-1.3/src/Fl_Image.cxx        2010-06-18 13:39:27 UTC (rev 
7649)
@@ -437,113 +437,6 @@
   fl_device->draw(this, XP, YP, WP, HP, cx, cy);
 }
 
-/*void Fl_RGB_Image::generic_device_draw(int XP, int YP, int WP, int HP, int 
cx, int cy) {
-  // Don't draw an empty image...
-  if (!d() || !array) {
-    draw_empty(XP, YP);
-    return;
-  }
-
-  // account for current clip region (faster on Irix):
-  int X,Y,W,H; fl_clip_box(XP,YP,WP,HP,X,Y,W,H);
-  cx += X-XP; cy += Y-YP;
-  // clip the box down to the size of image, quit if empty:
-  if (cx < 0) {W += cx; X -= cx; cx = 0;}
-  if (cx+W > w()) W = w()-cx;
-  if (W <= 0) return;
-  if (cy < 0) {H += cy; Y -= cy; cy = 0;}
-  if (cy+H > h()) H = h()-cy;
-  if (H <= 0) return;
-  if (!id_) {
-#ifdef __APPLE_QUARTZ__
-    CGColorSpaceRef lut = 0;
-    if (d()<=2)
-      lut = CGColorSpaceCreateDeviceGray();
-    else
-      lut = CGColorSpaceCreateDeviceRGB();
-    CGDataProviderRef src = CGDataProviderCreateWithData( 0L, array, 
w()*h()*d(), 0L);
-    id_ = CGImageCreate( w(), h(), 8, d()*8, ld()?ld():w()*d(),
-        lut, (d()&1)?kCGImageAlphaNone:kCGImageAlphaLast,
-        src, 0L, false, kCGRenderingIntentDefault);
-    CGColorSpaceRelease(lut);
-    CGDataProviderRelease(src);
-#elif defined(WIN32)
-    id_ = fl_create_offscreen(w(), h());
-    if ((d() == 2 || d() == 4) && fl_can_do_alpha_blending()) {
-      fl_begin_offscreen((Fl_Offscreen)id_);
-      fl_draw_image(array, 0, 0, w(), h(), d()|FL_IMAGE_WITH_ALPHA, ld());
-      fl_end_offscreen();
-    } else {
-      fl_begin_offscreen((Fl_Offscreen)id_);
-      fl_draw_image(array, 0, 0, w(), h(), d(), ld());
-      fl_end_offscreen();
-      if (d() == 2 || d() == 4) {
-        mask_ = fl_create_alphamask(w(), h(), d(), ld(), array);
-      }
-    }
-#else
-    if (d() == 1 || d() == 3) {
-      id_ = fl_create_offscreen(w(), h());
-      fl_begin_offscreen((Fl_Offscreen)id_);
-      fl_draw_image(array, 0, 0, w(), h(), d(), ld());
-      fl_end_offscreen();
-    }
-#endif
-  }
-
-#if defined(USE_X11)
-  if (id_) {
-    if (mask_) {
-      // I can't figure out how to combine a mask with existing region,
-      // so cut the image down to a clipped rectangle:
-      int nx, ny; fl_clip_box(X,Y,W,H,nx,ny,W,H);
-      cx += nx-X; X = nx;
-      cy += ny-Y; Y = ny;
-      // make X use the bitmap as a mask:
-      XSetClipMask(fl_display, fl_gc, mask_);
-      int ox = X-cx; if (ox < 0) ox += w();
-      int oy = Y-cy; if (oy < 0) oy += h();
-      XSetClipOrigin(fl_display, fl_gc, X-cx, Y-cy);
-    }
-
-    fl_copy_offscreen(X, Y, W, H, id_, cx, cy);
-
-    if (mask_) {
-      // put the old clip region back
-      XSetClipOrigin(fl_display, fl_gc, 0, 0);
-      fl_restore_clip();
-    }
-  } else {
-    // Composite image with alpha manually each time...
-    alpha_blend(this, X, Y, W, H, cx, cy);
-  }
-#elif defined(WIN32)
-  if (mask_) {
-    HDC new_gc = CreateCompatibleDC(fl_gc);
-    int save = SaveDC(new_gc);
-    SelectObject(new_gc, (void*)mask_);
-    BitBlt(fl_gc, X, Y, W, H, new_gc, cx, cy, SRCAND);
-    SelectObject(new_gc, (void*)id_);
-    BitBlt(fl_gc, X, Y, W, H, new_gc, cx, cy, SRCPAINT);
-    RestoreDC(new_gc,save);
-    DeleteDC(new_gc);
-  } else if (d()==2 || d()==4) {
-    fl_copy_offscreen_with_alpha(X, Y, W, H, (Fl_Offscreen)id_, cx, cy);
-  } else {
-    fl_copy_offscreen(X, Y, W, H, (Fl_Offscreen)id_, cx, cy);
-  }
-#elif defined(__APPLE_QUARTZ__)
-  if (id_ && fl_gc) {
-    CGRect rect = { { X, Y }, { W, H } };
-    Fl_X::q_begin_image(rect, cx, cy, w(), h());
-    CGContextDrawImage(fl_gc, rect, (CGImageRef)id_);
-    Fl_X::q_end_image();
-  }
-#else
-# error unsupported platform
-#endif
-}*/
-
 static int start(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int w, int 
h, int &cx, int &cy, 
                 int &X, int &Y, int &W, int &H)
 {

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to