Author: manolo
Date: 2012-03-12 05:10:56 -0700 (Mon, 12 Mar 2012)
New Revision: 9279
Log:
Replaced fl_copy_offscreen_with_alpha() by
GDIGraphicsDriver::copy_offscreen_with_alpha() and
fl_create_offscreen_with_alpha() by
QuartzGraphicsDriver::create_offscreen_with_alpha()
Modified:
branches/branch-3.0/include/fltk3/Device.h
branches/branch-3.0/include/fltk3/win32.h
branches/branch-3.0/src/fltk3/DoubleWindow.cxx
branches/branch-3.0/src/fltk3/Image.cxx
branches/branch-3.0/src/fltk3/Pixmap.cxx
branches/branch-3.0/src/fltk3/cocoa.mm
branches/branch-3.0/src/fltk3/cursor.cxx
Modified: branches/branch-3.0/include/fltk3/Device.h
===================================================================
--- branches/branch-3.0/include/fltk3/Device.h 2012-03-12 11:55:50 UTC (rev
9278)
+++ branches/branch-3.0/include/fltk3/Device.h 2012-03-12 12:10:56 UTC (rev
9279)
@@ -397,6 +397,9 @@
int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H);
void line_style(int style, int width=0, char* dashes=0);
void transformed_vertex(double xf, double yf);
+#if ! defined(FLTK3_DOXYGEN)
+ static fltk3::Offscreen create_offscreen_with_alpha(int w, int h);
+#endif
};
#endif
@@ -459,6 +462,9 @@
int not_clipped(int x, int y, int w, int h);
int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H);
void line_style(int style, int width=0, char* dashes=0);
+#if ! defined(FLTK3_DOXYGEN)
+ void copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP pixmap,int
srcx,int srcy);
+#endif
};
#endif
Modified: branches/branch-3.0/include/fltk3/win32.h
===================================================================
--- branches/branch-3.0/include/fltk3/win32.h 2012-03-12 11:55:50 UTC (rev
9278)
+++ branches/branch-3.0/include/fltk3/win32.h 2012-03-12 12:10:56 UTC (rev
9279)
@@ -154,7 +154,6 @@
FLTK3_EXPORT void fl_copy_offscreen(int x,int y,int w,int h,HBITMAP pixmap,int
srcx,int srcy);
-FLTK3_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-3.0/src/fltk3/DoubleWindow.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/DoubleWindow.cxx 2012-03-12 11:55:50 UTC
(rev 9278)
+++ branches/branch-3.0/src/fltk3/DoubleWindow.cxx 2012-03-12 12:10:56 UTC
(rev 9279)
@@ -177,7 +177,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 fltk3::GDIGraphicsDriver::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);
@@ -204,7 +204,7 @@
return 1;
}
-fltk3::Offscreen fl_create_offscreen_with_alpha(int w, int h) {
+fltk3::Offscreen fltk3::QuartzGraphicsDriver::create_offscreen_with_alpha(int
w, int h) {
void *data = calloc(w*h,4);
CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
CGContextRef ctx = CGBitmapContextCreate(
Modified: branches/branch-3.0/src/fltk3/Image.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/Image.cxx 2012-03-12 11:55:50 UTC (rev
9278)
+++ branches/branch-3.0/src/fltk3/Image.cxx 2012-03-12 12:10:56 UTC (rev
9279)
@@ -526,7 +526,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, (fltk3::Offscreen)img->id_, cx,
cy);
+ copy_offscreen_with_alpha(X, Y, W, H, (fltk3::Offscreen)img->id_, cx, cy);
} else {
fl_copy_offscreen(X, Y, W, H, (fltk3::Offscreen)img->id_, cx, cy);
}
Modified: branches/branch-3.0/src/fltk3/Pixmap.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/Pixmap.cxx 2012-03-12 11:55:50 UTC (rev
9278)
+++ branches/branch-3.0/src/fltk3/Pixmap.cxx 2012-03-12 12:10:56 UTC (rev
9279)
@@ -57,10 +57,6 @@
extern void fl_release_dc(HWND, HDC); // located in Fl_win32.cxx
#endif
-#ifdef __APPLE_QUARTZ__
-extern fltk3::Offscreen fl_create_offscreen_with_alpha(int w, int h);
-#endif
-
extern uchar **fl_mask_bitmap; // used by fltk3::draw_pixmap.cxx to store mask
namespace fltk3 {
@@ -118,7 +114,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((fltk3::Offscreen)pxm->id_);
fltk3::draw_pixmap(pxm->data(), 0, 0, fltk3::GREEN);
fl_end_offscreen();
Modified: branches/branch-3.0/src/fltk3/cocoa.mm
===================================================================
--- branches/branch-3.0/src/fltk3/cocoa.mm 2012-03-12 11:55:50 UTC (rev
9278)
+++ branches/branch-3.0/src/fltk3/cocoa.mm 2012-03-12 12:10:56 UTC (rev
9279)
@@ -79,7 +79,6 @@
// external functions
extern void fl_fix_focus();
-extern fltk3::Offscreen fl_create_offscreen_with_alpha(int w, int h);
// forward definition of functions in this file
// converting cr lf converter function
@@ -2938,7 +2937,7 @@
}
height = nl * fltk3::height() + 3;
width += 6;
- fltk3::Offscreen off = fl_create_offscreen_with_alpha(width, height);
+ fltk3::Offscreen off =
fltk3::QuartzGraphicsDriver::create_offscreen_with_alpha(width, height);
fl_begin_offscreen(off);
CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
fltk3::rectf(0,0,width,height);
@@ -2967,7 +2966,7 @@
static NSImage *defaultDragImage(int *pwidth, int *pheight)
{
const int width = 16, height = 16;
- fltk3::Offscreen off = fl_create_offscreen_with_alpha(width, height);
+ fltk3::Offscreen off =
fltk3::QuartzGraphicsDriver::create_offscreen_with_alpha(width, height);
fl_begin_offscreen(off);
CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
fltk3::rectf(0,0,width,height);
Modified: branches/branch-3.0/src/fltk3/cursor.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/cursor.cxx 2012-03-12 11:55:50 UTC (rev
9278)
+++ branches/branch-3.0/src/fltk3/cursor.cxx 2012-03-12 12:10:56 UTC (rev
9279)
@@ -134,13 +134,10 @@
# error "Either __LITTLE_ENDIAN__ or __BIG_ENDIAN__ must be defined"
#endif
-extern fltk3::Offscreen fl_create_offscreen_with_alpha(int w, int h);
-
-
CGContextRef Fl_X::help_cursor_image(void)
{
int w = 20, h = 20;
- fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+ fltk3::Offscreen off =
fltk3::QuartzGraphicsDriver::create_offscreen_with_alpha(w, h);
fl_begin_offscreen(off);
CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
fltk3::rectf(0,0,w,h);
@@ -154,7 +151,7 @@
CGContextRef Fl_X::none_cursor_image(void)
{
int w = 20, h = 20;
- fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+ fltk3::Offscreen off =
fltk3::QuartzGraphicsDriver::create_offscreen_with_alpha(w, h);
fl_begin_offscreen(off);
CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
fltk3::rectf(0,0,w,h);
@@ -167,7 +164,7 @@
int w, h, r = 5;
w = 2*r+6;
h = 4*r;
- fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+ fltk3::Offscreen off =
fltk3::QuartzGraphicsDriver::create_offscreen_with_alpha(w, h);
fl_begin_offscreen(off);
CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
fltk3::rectf(0,0,w,h);
@@ -191,7 +188,7 @@
{
int c = 7, r = 2*c;
int w = r, h = r;
- fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+ fltk3::Offscreen off =
fltk3::QuartzGraphicsDriver::create_offscreen_with_alpha(w, h);
fl_begin_offscreen(off);
CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
fltk3::rectf(0,0,w,h);
@@ -211,7 +208,7 @@
{
int c = 7, r = 2*c;
int w = r, h = r;
- fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+ fltk3::Offscreen off =
fltk3::QuartzGraphicsDriver::create_offscreen_with_alpha(w, h);
fl_begin_offscreen(off);
CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
fltk3::rectf(0,0,w,h);
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit