mirror of https://github.com/fltk/fltk
Change fl_create_deepmask() to fl_create_alphamask().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
0c396a615b
commit
e1828d045f
2
CHANGES
2
CHANGES
|
@ -1,7 +1,7 @@
|
|||
CHANGES IN FLTK 1.1.0
|
||||
|
||||
- Implemented full alpha blending under MacOS X.
|
||||
- Added fl_create_deepmask() function to create an alpha
|
||||
- Added fl_create_alphamask() function to create an alpha
|
||||
mask from 8-bit data; under MacOS X this creates an
|
||||
8-bit bitmask, while other OS's currently get 1-bit
|
||||
screen-door bitmasks.
|
||||
|
|
6
FL/mac.H
6
FL/mac.H
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: mac.H,v 1.1.2.6 2002/04/14 21:26:05 easysw Exp $"
|
||||
// "$Id: mac.H,v 1.1.2.7 2002/04/15 12:19:00 easysw Exp $"
|
||||
//
|
||||
// Mac header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -107,7 +107,7 @@ extern void fl_end_offscreen();
|
|||
typedef GWorldPtr Fl_Bitmask; // Carbon requires a 1-bit GWorld instead of a BitMap
|
||||
|
||||
extern FL_EXPORT Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data);
|
||||
extern FL_EXPORT Fl_Bitmask fl_create_deepmask(int w, int h, int d, int ld, const uchar *data);
|
||||
extern FL_EXPORT Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data);
|
||||
extern FL_EXPORT void fl_delete_bitmask(Fl_Bitmask bm);
|
||||
|
||||
extern void fl_open_display();
|
||||
|
@ -117,6 +117,6 @@ extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b)
|
|||
#endif // !FL_MAC_H
|
||||
|
||||
//
|
||||
// End of "$Id: mac.H,v 1.1.2.6 2002/04/14 21:26:05 easysw Exp $".
|
||||
// End of "$Id: mac.H,v 1.1.2.7 2002/04/15 12:19:00 easysw Exp $".
|
||||
//
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: win32.H,v 1.15.2.3.2.5 2002/04/14 21:26:05 easysw Exp $"
|
||||
// "$Id: win32.H,v 1.15.2.3.2.6 2002/04/15 12:19:00 easysw Exp $"
|
||||
//
|
||||
// WIN32 header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -124,11 +124,11 @@ FL_EXPORT void fl_copy_offscreen(int x,int y,int w,int h,HBITMAP pixmap,int srcx
|
|||
typedef HBITMAP Fl_Bitmask;
|
||||
|
||||
extern FL_EXPORT Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data);
|
||||
extern FL_EXPORT Fl_Bitmask fl_create_deepmask(int w, int h, int d, int ld, const uchar *data);
|
||||
extern FL_EXPORT Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data);
|
||||
extern FL_EXPORT void fl_delete_bitmask(Fl_Bitmask bm);
|
||||
|
||||
extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b);
|
||||
|
||||
//
|
||||
// End of "$Id: win32.H,v 1.15.2.3.2.5 2002/04/14 21:26:05 easysw Exp $".
|
||||
// End of "$Id: win32.H,v 1.15.2.3.2.6 2002/04/15 12:19:00 easysw Exp $".
|
||||
//
|
||||
|
|
6
FL/x.H
6
FL/x.H
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: x.H,v 1.10.2.8.2.8 2002/04/14 21:26:05 easysw Exp $"
|
||||
// "$Id: x.H,v 1.10.2.8.2.9 2002/04/15 12:19:01 easysw Exp $"
|
||||
//
|
||||
// X11 header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -98,7 +98,7 @@ typedef ulong Fl_Offscreen;
|
|||
typedef ulong Fl_Bitmask;
|
||||
|
||||
extern FL_EXPORT Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data);
|
||||
extern FL_EXPORT Fl_Bitmask fl_create_deepmask(int w, int h, int d, int ld, const uchar *data);
|
||||
extern FL_EXPORT Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data);
|
||||
extern FL_EXPORT void fl_delete_bitmask(Fl_Bitmask bm);
|
||||
|
||||
// this object contains all X-specific stuff about a window:
|
||||
|
@ -138,5 +138,5 @@ extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b)
|
|||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: x.H,v 1.10.2.8.2.8 2002/04/14 21:26:05 easysw Exp $".
|
||||
// End of "$Id: x.H,v 1.10.2.8.2.9 2002/04/15 12:19:01 easysw Exp $".
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.11 2002/04/14 21:26:05 easysw Exp $"
|
||||
// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.12 2002/04/15 12:19:01 easysw Exp $"
|
||||
//
|
||||
// Bitmap drawing routines for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -208,8 +208,8 @@ void fl_delete_bitmask(Fl_Bitmask bm) {
|
|||
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Create an 8-bit "deep" mask (used for alpha blending)
|
||||
Fl_Bitmask fl_create_deepmask(int w, int h, int d, int ld, const uchar *array) {
|
||||
// Create an 8-bit mask used for alpha blending
|
||||
Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *array) {
|
||||
Rect srcRect;
|
||||
srcRect.left = 0; srcRect.right = w;
|
||||
srcRect.top = 0; srcRect.bottom = h;
|
||||
|
@ -249,8 +249,8 @@ Fl_Bitmask fl_create_deepmask(int w, int h, int d, int ld, const uchar *array) {
|
|||
return gw; /* tell caller we succeeded! */
|
||||
}
|
||||
#else
|
||||
// Create a 1-bit "deep" mask (used for alpha blending)
|
||||
Fl_Bitmask fl_create_deepmask(int w, int h, int d, int ld, const uchar *array) {
|
||||
// Create a 1-bit mask used for alpha blending
|
||||
Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *array) {
|
||||
Fl_Bitmask mask;
|
||||
int bmw = (w + 7) / 8;
|
||||
uchar *bitmap = new uchar[bmw * h];
|
||||
|
@ -456,5 +456,5 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) {
|
|||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.11 2002/04/14 21:26:05 easysw Exp $".
|
||||
// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.12 2002/04/15 12:19:01 easysw Exp $".
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_Image.cxx,v 1.5.2.3.2.17 2002/04/14 21:26:06 easysw Exp $"
|
||||
// "$Id: Fl_Image.cxx,v 1.5.2.3.2.18 2002/04/15 12:19:01 easysw Exp $"
|
||||
//
|
||||
// Image drawing code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -268,7 +268,7 @@ void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
|||
fl_end_offscreen();
|
||||
|
||||
if (d() == 2 || d() == 4) {
|
||||
mask = fl_create_deepmask(w(), h(), d(), ld(), array);
|
||||
mask = fl_create_alphamask(w(), h(), d(), ld(), array);
|
||||
}
|
||||
}
|
||||
#ifdef WIN32
|
||||
|
@ -334,5 +334,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) {
|
|||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.17 2002/04/14 21:26:06 easysw Exp $".
|
||||
// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.18 2002/04/15 12:19:01 easysw Exp $".
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue