summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-11-22 15:35:02 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-11-22 15:35:02 +0000
commitf5258404959cff3a299c796676b553b843a94355 (patch)
treef6820c57e99b0038b9bc734d7123d536a33af267 /FL
parent4323f46e2c31bc070036a9923711293f169ffb85 (diff)
Fix all references to '.C' files (now .cxx)
Update Fl_Image() class to track depth and data, so FLUID will be able to use it as the base class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1712 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Bitmap.H8
-rw-r--r--FL/Fl_Image.H27
-rw-r--r--FL/Fl_Pixmap.H14
3 files changed, 29 insertions, 20 deletions
diff --git a/FL/Fl_Bitmap.H b/FL/Fl_Bitmap.H
index f4dc0bdf3..c4864d36e 100644
--- a/FL/Fl_Bitmap.H
+++ b/FL/Fl_Bitmap.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Bitmap.H,v 1.5.2.3.2.3 2001/11/19 01:06:45 easysw Exp $"
+// "$Id: Fl_Bitmap.H,v 1.5.2.3.2.4 2001/11/22 15:35:01 easysw Exp $"
//
// Bitmap header file for the Fast Light Tool Kit (FLTK).
//
@@ -38,9 +38,9 @@ class FL_EXPORT Fl_Bitmap : public Fl_Image {
Fl_Bitmask id; // for internal use
Fl_Bitmap(const uchar *bits, int W, int H) :
- Fl_Image(W,H), array(bits), alloc_array(0), id(0) {}
+ Fl_Image(W,H,0), array(bits), alloc_array(0), id(0) {data(&((const char *)array), 1);}
Fl_Bitmap(const char *bits, int W, int H) :
- Fl_Image(W,H), array((const uchar *)bits), alloc_array(0), id(0) {}
+ Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id(0) {data(&((const char *)array), 1);}
virtual ~Fl_Bitmap();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
@@ -53,5 +53,5 @@ class FL_EXPORT Fl_Bitmap : public Fl_Image {
#endif
//
-// End of "$Id: Fl_Bitmap.H,v 1.5.2.3.2.3 2001/11/19 01:06:45 easysw Exp $".
+// End of "$Id: Fl_Bitmap.H,v 1.5.2.3.2.4 2001/11/22 15:35:01 easysw Exp $".
//
diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H
index 77de42652..596b268a8 100644
--- a/FL/Fl_Image.H
+++ b/FL/Fl_Image.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Image.H,v 1.5.2.3.2.3 2001/11/19 01:06:45 easysw Exp $"
+// "$Id: Fl_Image.H,v 1.5.2.3.2.4 2001/11/22 15:35:01 easysw Exp $"
//
// Image header file for the Fast Light Tool Kit (FLTK).
//
@@ -32,16 +32,25 @@ class Fl_Widget;
struct Fl_Menu_Item;
class FL_EXPORT Fl_Image {
- int w_, h_;
+ int w_, h_, d_, count_;
+ const char * const *data_;
- public:
+ protected:
- int w() const {return w_;}
void w(int W) {w_ = W;}
- int h() const {return h_;}
void h(int H) {h_ = H;}
+ void d(int D) {d_ = D;}
+ void data(const char * const *p, int c) {data_ = p; count_ = c;}
- Fl_Image(int W, int H) {w_ = W; h_ = H;}
+ public:
+
+ int w() const {return w_;}
+ int h() const {return h_;}
+ int d() const {return d_;}
+ int count() const {return count_;}
+ const char * const *data() const {return data_;}
+
+ Fl_Image(int W, int H, int D) {w_ = W; h_ = H; d_ = D; count_ = 0; data_ = 0;}
virtual ~Fl_Image();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
@@ -59,12 +68,12 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image {
const uchar *array;
int alloc_array; // Non-zero if array was allocated
- int d, ld;
+ int ld;
Fl_Offscreen id; // for internal use
Fl_Bitmask mask; // for internal use (mask bitmap)
Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0) :
- Fl_Image(W,H), array(bits), alloc_array(0), d(D), ld(LD), id(0) {}
+ Fl_Image(W,H,D), array(bits), alloc_array(0), ld(LD), id(0) {data(&((char *)array), 1);}
virtual ~Fl_RGB_Image();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
@@ -79,5 +88,5 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image {
#endif
//
-// End of "$Id: Fl_Image.H,v 1.5.2.3.2.3 2001/11/19 01:06:45 easysw Exp $".
+// End of "$Id: Fl_Image.H,v 1.5.2.3.2.4 2001/11/22 15:35:01 easysw Exp $".
//
diff --git a/FL/Fl_Pixmap.H b/FL/Fl_Pixmap.H
index 609753016..60bf77b53 100644
--- a/FL/Fl_Pixmap.H
+++ b/FL/Fl_Pixmap.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Pixmap.H,v 1.6.2.8.2.4 2001/11/19 01:06:45 easysw Exp $"
+// "$Id: Fl_Pixmap.H,v 1.6.2.8.2.5 2001/11/22 15:35:01 easysw Exp $"
//
// Pixmap header file for the Fast Light Tool Kit (FLTK).
//
@@ -38,19 +38,19 @@ struct Fl_Menu_Item;
class FL_EXPORT Fl_Pixmap : public Fl_Image {
void copy_data();
void delete_data();
+ void set_data(const char * const *p);
void measure();
public:
- const char * const * data;
int alloc_data; // Non-zero if data was allocated
Fl_Offscreen id; // for internal use
Fl_Bitmask mask; // for internal use (mask bitmap)
- explicit Fl_Pixmap(char * const * d) : Fl_Image(-1,0), data((const char*const*)d), alloc_data(0), id(0), mask(0) {measure();}
- explicit Fl_Pixmap(uchar* const * d) : Fl_Image(-1,0), data((const char*const*)d), alloc_data(0), id(0), mask(0) {measure();}
- explicit Fl_Pixmap(const char * const * d) : Fl_Image(-1,0), data(d), alloc_data(0), id(0), mask(0) {measure();}
- explicit Fl_Pixmap(const uchar* const * d) : Fl_Image(-1,0), data((const char*const*)d), alloc_data(0), id(0), mask(0) {measure();}
+ explicit Fl_Pixmap(char * const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();}
+ explicit Fl_Pixmap(uchar* const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();}
+ explicit Fl_Pixmap(const char * const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();}
+ explicit Fl_Pixmap(const uchar* const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();}
virtual ~Fl_Pixmap();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
@@ -65,5 +65,5 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image {
#endif
//
-// End of "$Id: Fl_Pixmap.H,v 1.6.2.8.2.4 2001/11/19 01:06:45 easysw Exp $".
+// End of "$Id: Fl_Pixmap.H,v 1.6.2.8.2.5 2001/11/22 15:35:01 easysw Exp $".
//