Author: manolo
Date: 2012-03-12 04:55:50 -0700 (Mon, 12 Mar 2012)
New Revision: 9278
Log:
Replaced fl_copy_offscreen_with_alpha() by 
Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha() and
fl_create_offscreen_with_alpha() by 
Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha()

Modified:
   branches/branch-1.3/FL/Fl_Device.H
   branches/branch-1.3/FL/win32.H
   branches/branch-1.3/src/Fl_Double_Window.cxx
   branches/branch-1.3/src/Fl_Image.cxx
   branches/branch-1.3/src/Fl_Pixmap.cxx
   branches/branch-1.3/src/Fl_cocoa.mm
   branches/branch-1.3/src/fl_cursor.cxx

Modified: branches/branch-1.3/FL/Fl_Device.H
===================================================================
--- branches/branch-1.3/FL/Fl_Device.H  2012-03-12 09:56:12 UTC (rev 9277)
+++ branches/branch-1.3/FL/Fl_Device.H  2012-03-12 11:55:50 UTC (rev 9278)
@@ -4,7 +4,7 @@
 // Definition of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, 
Fl_Display_Device
 // for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 2010-2011 by Bill Spitzak and others.
+// Copyright 2010-2012 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -421,6 +421,9 @@
   void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h);
   int height();
   int descent();
+#if ! defined(FL_DOXYGEN)
+  static Fl_Offscreen create_offscreen_with_alpha(int w, int h);
+#endif
 };
 #endif
 #if defined(WIN32) || defined(FL_DOXYGEN)
@@ -451,6 +454,9 @@
   void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h);
   int height();
   int descent();
+#if ! defined(FL_DOXYGEN)
+  void copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int 
srcx,int srcy);
+#endif
 };
 #endif
 #if !(defined(__APPLE__) || defined(WIN32))

Modified: branches/branch-1.3/FL/win32.H
===================================================================
--- branches/branch-1.3/FL/win32.H      2012-03-12 09:56:12 UTC (rev 9277)
+++ branches/branch-1.3/FL/win32.H      2012-03-12 11:55:50 UTC (rev 9278)
@@ -3,7 +3,7 @@
 //
 // WIN32 header file for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2011 by Bill Spitzak and others.
+// Copyright 1998-2012 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -136,7 +136,6 @@
 
 
 FL_EXPORT void fl_copy_offscreen(int x,int y,int w,int h,HBITMAP pixmap,int 
srcx,int srcy);
-FL_EXPORT void fl_copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP 
pixmap,int srcx,int srcy);
 #define fl_delete_offscreen(bitmap) DeleteObject(bitmap)
 
 // Bitmap masks

Modified: branches/branch-1.3/src/Fl_Double_Window.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Double_Window.cxx        2012-03-12 09:56:12 UTC 
(rev 9277)
+++ branches/branch-1.3/src/Fl_Double_Window.cxx        2012-03-12 11:55:50 UTC 
(rev 9278)
@@ -167,7 +167,7 @@
   DeleteDC(new_gc);
 }
 
-void fl_copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int 
srcx,int srcy) {
+void Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha(int x,int y,int w,int 
h,HBITMAP bitmap,int srcx,int srcy) {
   HDC new_gc = CreateCompatibleDC(fl_gc);
   int save = SaveDC(new_gc);
   SelectObject(new_gc, bitmap);
@@ -176,7 +176,7 @@
   // if to printer, always try alpha_blend
   int to_display = Fl_Surface_Device::surface()->class_name() == 
Fl_Display_Device::class_id; // true iff display output
   if ( (to_display && fl_can_do_alpha_blending()) || 
Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) {
-    alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, srcx, srcy, w, h, 
blendfunc);
+    if (fl_alpha_blend) alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, 
srcx, srcy, w, h, blendfunc);
   }
   // if that failed (it shouldn't), still copy the bitmap over, but now alpha 
is 1
   if (!alpha_ok) {
@@ -194,7 +194,7 @@
   return 1;
 }
 
-Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h) {
+Fl_Offscreen Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(int w, int 
h) {
   void *data = calloc(w*h,4);
   CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
   CGContextRef ctx = CGBitmapContextCreate(

Modified: branches/branch-1.3/src/Fl_Image.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Image.cxx        2012-03-12 09:56:12 UTC (rev 
9277)
+++ branches/branch-1.3/src/Fl_Image.cxx        2012-03-12 11:55:50 UTC (rev 
9278)
@@ -3,7 +3,7 @@
 //
 // Image drawing code for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2012 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -513,7 +513,7 @@
     RestoreDC(new_gc,save);
     DeleteDC(new_gc);
   } else if (img->d()==2 || img->d()==4) {
-    fl_copy_offscreen_with_alpha(X, Y, W, H, (Fl_Offscreen)img->id_, cx, cy);
+    copy_offscreen_with_alpha(X, Y, W, H, (Fl_Offscreen)img->id_, cx, cy);
   } else {
     fl_copy_offscreen(X, Y, W, H, (Fl_Offscreen)img->id_, cx, cy);
   }

Modified: branches/branch-1.3/src/Fl_Pixmap.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Pixmap.cxx       2012-03-12 09:56:12 UTC (rev 
9277)
+++ branches/branch-1.3/src/Fl_Pixmap.cxx       2012-03-12 11:55:50 UTC (rev 
9278)
@@ -3,7 +3,7 @@
 //
 // Pixmap drawing code for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2012 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -48,10 +48,6 @@
 extern void fl_release_dc(HWND, HDC);      // located in Fl_win32.cxx
 #endif
 
-#ifdef __APPLE_QUARTZ__
-extern Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h);
-#endif
-
 extern uchar **fl_mask_bitmap; // used by fl_draw_pixmap.cxx to store mask
 void fl_restore_clip(); // in fl_rect.cxx
 
@@ -106,7 +102,7 @@
     return;
     }
   if (!pxm->id_) {
-    pxm->id_ = fl_create_offscreen_with_alpha(pxm->w(), pxm->h());
+    pxm->id_ = create_offscreen_with_alpha(pxm->w(), pxm->h());
     fl_begin_offscreen((Fl_Offscreen)pxm->id_);
     fl_draw_pixmap(pxm->data(), 0, 0, FL_GREEN);
     fl_end_offscreen();

Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2012-03-12 09:56:12 UTC (rev 9277)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2012-03-12 11:55:50 UTC (rev 9278)
@@ -78,7 +78,6 @@
 
 // external functions
 extern void fl_fix_focus();
-extern Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h);
 extern unsigned short *fl_compute_macKeyLookUp();
 
 // forward definition of functions in this file
@@ -3154,7 +3153,7 @@
   }
   height = nl * fl_height() + 3;
   width += 6;
-  Fl_Offscreen off = fl_create_offscreen_with_alpha(width, height);
+  Fl_Offscreen off = 
Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(width, height);
   fl_begin_offscreen(off);
   CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
   fl_rectf(0,0,width,height);
@@ -3183,7 +3182,7 @@
 static NSImage *defaultDragImage(int *pwidth, int *pheight)
 {
   const int width = 16, height = 16;
-  Fl_Offscreen off = fl_create_offscreen_with_alpha(width, height);
+  Fl_Offscreen off = 
Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(width, height);
   fl_begin_offscreen(off);
   CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
   fl_rectf(0,0,width,height);

Modified: branches/branch-1.3/src/fl_cursor.cxx
===================================================================
--- branches/branch-1.3/src/fl_cursor.cxx       2012-03-12 09:56:12 UTC (rev 
9277)
+++ branches/branch-1.3/src/fl_cursor.cxx       2012-03-12 11:55:50 UTC (rev 
9278)
@@ -3,7 +3,7 @@
 //
 // Mouse cursor support for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2012 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -125,13 +125,10 @@
 # error "Either __LITTLE_ENDIAN__ or __BIG_ENDIAN__ must be defined"
 #endif
 
-extern Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h);
-
-
 CGContextRef Fl_X::help_cursor_image(void)
 {
   int w = 20, h = 20;
-  Fl_Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, 
h);
   fl_begin_offscreen(off);
   CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
   fl_rectf(0,0,w,h);
@@ -145,7 +142,7 @@
 CGContextRef Fl_X::none_cursor_image(void)
 {
   int w = 20, h = 20;
-  Fl_Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, 
h);
   fl_begin_offscreen(off);
   CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
   fl_rectf(0,0,w,h);
@@ -158,7 +155,7 @@
   int w, h, r = 5;
   w = 2*r+6;
   h = 4*r;
-  Fl_Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, 
h);
   fl_begin_offscreen(off);
   CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
   fl_rectf(0,0,w,h);
@@ -182,7 +179,7 @@
 {
   int c = 7, r = 2*c;
   int w = r, h = r;
-  Fl_Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, 
h);
   fl_begin_offscreen(off);
   CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
   fl_rectf(0,0,w,h);
@@ -202,7 +199,7 @@
 {
   int c = 7, r = 2*c;
   int w = r, h = r;
-  Fl_Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, 
h);
   fl_begin_offscreen(off);
   CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
   fl_rectf(0,0,w,h);

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

Reply via email to