diff options
| author | Manolo Gouy <Manolo> | 2010-06-18 13:39:27 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-06-18 13:39:27 +0000 |
| commit | 006e5ff9c0013b054664dc9d3a45f980398ca2e3 (patch) | |
| tree | 41c2c8278584932faaa07ef41826deb17ad053aa /src | |
| parent | 6710c8350845fd2ade45de4f2ae668ae9474f7cd (diff) | |
Removed commented out code
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7649 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Image.cxx | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 26c45b471..1c87699cc 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -437,113 +437,6 @@ void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) { 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) { |
