summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Bitmap.H8
-rw-r--r--FL/Fl_Image.H8
-rw-r--r--FL/Fl_JPEG_Image.H4
-rw-r--r--FL/Fl_SVG_Image.H7
-rw-r--r--FL/Fl_Shared_Image.H1
5 files changed, 18 insertions, 10 deletions
diff --git a/FL/Fl_Bitmap.H b/FL/Fl_Bitmap.H
index 23fd79abd..308e09022 100644
--- a/FL/Fl_Bitmap.H
+++ b/FL/Fl_Bitmap.H
@@ -43,12 +43,16 @@ private:
int cache_w_, cache_h_; // size of bitmap when cached
public:
- /** The constructors create a new bitmap from the specified bitmap data */
+ /** The constructors create a new bitmap from the specified bitmap data.
+ \see Fl_Bitmap(const uchar *bits, int bits_length, int W, int H) */
Fl_Bitmap(const uchar *bits, int W, int H) :
Fl_Image(W,H,0), array(bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {data((const char **)&array, 1);}
- /** The constructors create a new bitmap from the specified bitmap data */
+ /** The constructors create a new bitmap from the specified bitmap data.
+ \see Fl_Bitmap(const char *bits, int bits_length, int W, int H) */
Fl_Bitmap(const char *bits, int W, int H) :
Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {data((const char **)&array, 1);}
+ Fl_Bitmap(const uchar *bits, int bits_length, int W, int H);
+ Fl_Bitmap(const char *bits, int bits_length, int W, int H);
virtual ~Fl_Bitmap();
virtual Fl_Image *copy(int W, int H) const;
Fl_Image *copy() const { return Fl_Image::copy(); }
diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H
index 038384991..d571d9e88 100644
--- a/FL/Fl_Image.H
+++ b/FL/Fl_Image.H
@@ -60,9 +60,10 @@ enum Fl_RGB_Scaling {
class FL_EXPORT Fl_Image {
friend class Fl_Graphics_Driver;
public:
- static const int ERR_NO_IMAGE = -1;
- static const int ERR_FILE_ACCESS = -2;
- static const int ERR_FORMAT = -3;
+ static const int ERR_NO_IMAGE = -1;
+ static const int ERR_FILE_ACCESS = -2;
+ static const int ERR_FORMAT = -3;
+ static const int ERR_MEMORY_ACCESS = -4;
private:
int w_, h_, d_, ld_, count_;
@@ -353,6 +354,7 @@ private:
public:
Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0);
+ Fl_RGB_Image(const uchar *bits, int bits_length, int W, int H, int D, int LD);
Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg=FL_GRAY);
virtual ~Fl_RGB_Image();
virtual Fl_Image *copy(int W, int H) const;
diff --git a/FL/Fl_JPEG_Image.H b/FL/Fl_JPEG_Image.H
index f4eeb42cf..4e741487a 100644
--- a/FL/Fl_JPEG_Image.H
+++ b/FL/Fl_JPEG_Image.H
@@ -32,11 +32,11 @@ class FL_EXPORT Fl_JPEG_Image : public Fl_RGB_Image {
public:
Fl_JPEG_Image(const char *filename);
- Fl_JPEG_Image(const char *name, const unsigned char *data);
+ Fl_JPEG_Image(const char *name, const unsigned char *data, int data_length=-1);
protected:
- void load_jpg_(const char *filename, const char *sharename, const unsigned char *data);
+ void load_jpg_(const char *filename, const char *sharename, const unsigned char *data, int data_length=-1);
};
diff --git a/FL/Fl_SVG_Image.H b/FL/Fl_SVG_Image.H
index 530c51a82..2171c2a75 100644
--- a/FL/Fl_SVG_Image.H
+++ b/FL/Fl_SVG_Image.H
@@ -147,14 +147,15 @@ private:
float svg_scaling_(int W, int H);
void rasterize_(int W, int H);
virtual void cache_size_(int &width, int &height);
- void init_(const char *filename, const unsigned char *filedata, const Fl_SVG_Image *copy_source,
- size_t length);
+ void init_(const char *name, const unsigned char *filedata, size_t length);
Fl_SVG_Image(const Fl_SVG_Image *source);
public:
/** Set this to \c false to allow image re-scaling that alters the image aspect ratio.
Upon object creation, proportional is set to \c true, and the aspect ratio is kept constant.*/
bool proportional;
- Fl_SVG_Image(const char *filename, const char *svg_data = NULL, size_t length = 0);
+ Fl_SVG_Image(const char *filename);
+ Fl_SVG_Image(const char *sharedname, const char *svg_data);
+ Fl_SVG_Image(const char *sharedname, const unsigned char *svg_data, size_t length);
virtual ~Fl_SVG_Image();
virtual Fl_Image *copy(int W, int H) const;
Fl_Image *copy() const {
diff --git a/FL/Fl_Shared_Image.H b/FL/Fl_Shared_Image.H
index 07551b70e..9307b9e58 100644
--- a/FL/Fl_Shared_Image.H
+++ b/FL/Fl_Shared_Image.H
@@ -94,6 +94,7 @@ class FL_EXPORT Fl_Shared_Image : public Fl_Image {
friend class Fl_JPEG_Image;
friend class Fl_PNG_Image;
+ friend class Fl_SVG_Image;
friend class Fl_Graphics_Driver;
protected: