summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2003-01-10 19:29:09 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2003-01-10 19:29:09 +0000
commit4bf5385fb14c5d4e0d4fb061b5ef1a79cb45389d (patch)
tree3900fd96ea1e3c1b343a00fbc04f1bb321c5f54f /src
parent24f57a7aea2d98a47684103459170b2389f8ad5f (diff)
Update Fl_Image and friends so that we don't need to include the
system headers (which unfortunately are not too friendly with other code...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2893 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Bitmap.cxx10
-rw-r--r--src/Fl_Image.cxx12
-rw-r--r--src/Fl_Pixmap.cxx12
-rw-r--r--src/Fl_get_system_colors.cxx14
4 files changed, 20 insertions, 28 deletions
diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx
index 6989fb753..140aac594 100644
--- a/src/Fl_Bitmap.cxx
+++ b/src/Fl_Bitmap.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.20 2002/12/19 21:34:25 easysw Exp $"
+// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.21 2003/01/10 19:29:08 easysw Exp $"
//
// Bitmap drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -361,10 +361,10 @@ void Fl_Bitmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
GrafPtr dstPort;
GetPort( &dstPort );
Rect src, dst;
- GetPortBounds( id, &src );
+ GetPortBounds( (Fl_Offscreen)id, &src );
SetRect( &src, cx, cy, cx+W, cy+H );
SetRect( &dst, X, Y, X+W, Y+H );
- CopyBits(GetPortBitMapForCopyBits(id), // srcBits
+ CopyBits(GetPortBitMapForCopyBits((Fl_Offscreen)id), // srcBits
GetPortBitMapForCopyBits(dstPort), // dstBits
&src, // src bounds
&dst, // dst bounds
@@ -390,7 +390,7 @@ Fl_Bitmap::~Fl_Bitmap() {
void Fl_Bitmap::uncache() {
if (id) {
- fl_delete_bitmask(id);
+ fl_delete_bitmask((Fl_Offscreen)id);
id = 0;
}
}
@@ -474,5 +474,5 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) {
//
-// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.20 2002/12/19 21:34:25 easysw Exp $".
+// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.21 2003/01/10 19:29:08 easysw Exp $".
//
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index eb9135ecf..4912eaf32 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Image.cxx,v 1.5.2.3.2.26 2002/12/19 21:34:25 easysw Exp $"
+// "$Id: Fl_Image.cxx,v 1.5.2.3.2.27 2003/01/10 19:29:09 easysw Exp $"
//
// Image drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -125,12 +125,12 @@ Fl_RGB_Image::~Fl_RGB_Image() {
void Fl_RGB_Image::uncache() {
if (id) {
- fl_delete_offscreen(id);
+ fl_delete_offscreen((Fl_Offscreen)id);
id = 0;
}
if (mask) {
- fl_delete_bitmask(mask);
+ fl_delete_bitmask((Fl_Bitmask)mask);
mask = 0;
}
}
@@ -310,7 +310,7 @@ void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
if (H <= 0) return;
if (!id) {
id = fl_create_offscreen(w(), h());
- fl_begin_offscreen(id);
+ fl_begin_offscreen((Fl_Offscreen)id);
fl_draw_image(array, 0, 0, w(), h(), d(), ld());
fl_end_offscreen();
@@ -357,7 +357,7 @@ void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
&src, &src, &dst);
#endif // 0
} else {
- fl_copy_offscreen(X, Y, W, H, id, cx, cy);
+ fl_copy_offscreen(X, Y, W, H, (Fl_Offscreen)id, cx, cy);
}
#else
if (mask) {
@@ -392,5 +392,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) {
//
-// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.26 2002/12/19 21:34:25 easysw Exp $".
+// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.27 2003/01/10 19:29:09 easysw Exp $".
//
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index c1b038277..37e04d4e1 100644
--- a/src/Fl_Pixmap.cxx
+++ b/src/Fl_Pixmap.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.24 2002/12/19 21:34:26 easysw Exp $"
+// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.25 2003/01/10 19:29:09 easysw Exp $"
//
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -81,7 +81,7 @@ void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
if (H <= 0) return;
if (!id) {
id = fl_create_offscreen(w(), h());
- fl_begin_offscreen(id);
+ fl_begin_offscreen((Fl_Offscreen)id);
uchar *bitmap = 0;
fl_mask_bitmap = &bitmap;
fl_draw_pixmap(data(), 0, 0, FL_BLACK);
@@ -121,7 +121,7 @@ void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
GetPortBitMapForCopyBits(GetWindowPort(fl_window)),
&src, &src, &dst);
} else {
- fl_copy_offscreen(X, Y, W, H, id, cx, cy);
+ fl_copy_offscreen(X, Y, W, H, (Fl_Offscreen)id, cx, cy);
}
#else
if (mask) {
@@ -152,12 +152,12 @@ Fl_Pixmap::~Fl_Pixmap() {
void Fl_Pixmap::uncache() {
if (id) {
- fl_delete_offscreen(id);
+ fl_delete_offscreen((Fl_Offscreen)id);
id = 0;
}
if (mask) {
- fl_delete_bitmask(mask);
+ fl_delete_bitmask((Fl_Bitmask)mask);
mask = 0;
}
}
@@ -461,5 +461,5 @@ void Fl_Pixmap::desaturate() {
}
//
-// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.24 2002/12/19 21:34:26 easysw Exp $".
+// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.25 2003/01/10 19:29:09 easysw Exp $".
//
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index 3ed77b0a2..3409161e4 100644
--- a/src/Fl_get_system_colors.cxx
+++ b/src/Fl_get_system_colors.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.14 2002/11/19 16:37:35 easysw Exp $"
+// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.15 2003/01/10 19:29:09 easysw Exp $"
//
// System color support for the Fast Light Tool Kit (FLTK).
//
@@ -260,15 +260,7 @@ int Fl::reload_scheme() {
sprintf(tile_cmap[2], ". c #%02x%02x%02x", 0xd8 * (int)r / 0xf0,
0xd8 * (int)g / 0xf0, 0xd8 * (int)b / 0xf0);
- if (tile.id) {
- fl_delete_offscreen(tile.id);
- tile.id = 0;
- }
-
- if (tile.mask) {
- fl_delete_bitmask(tile.mask);
- tile.mask = 0;
- }
+ tile.uncache();
if (!scheme_bg_) scheme_bg_ = new Fl_Tiled_Image(&tile, w(), h());
@@ -317,5 +309,5 @@ int Fl::reload_scheme() {
//
-// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.14 2002/11/19 16:37:35 easysw Exp $".
+// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.15 2003/01/10 19:29:09 easysw Exp $".
//