summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2017-10-02 11:18:41 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2017-10-02 11:18:41 +0000
commit64052828ca54cabf96392b92574e9d732722e701 (patch)
treedfd57587a92e666223439c418b69e45ebc9d8c4d /FL
parent37a8ef98f02f7dc437f69cbb7cd8e1c0242c4a48 (diff)
Add public accessor Fl_Shared_Image::original().
This public, inline, and read-only accessor is intended for debugging purposes but can be useful for user code as well. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Shared_Image.H17
1 files changed, 15 insertions, 2 deletions
diff --git a/FL/Fl_Shared_Image.H b/FL/Fl_Shared_Image.H
index 64d5f51fd..4ef226eb7 100644
--- a/FL/Fl_Shared_Image.H
+++ b/FL/Fl_Shared_Image.H
@@ -3,7 +3,7 @@
//
// Shared image header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2016 by Bill Spitzak and others.
+// Copyright 1998-2017 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -83,8 +83,21 @@ protected:
public:
/** Returns the filename of the shared image */
const char *name() { return name_; }
- /** Returns the number of references of this shared image. When reference is below 1, the image is deleted. */
+
+ /** Returns the number of references of this shared image.
+ When reference is below 1, the image is deleted.
+ */
int refcount() { return refcount_; }
+
+ /** Returns whether this is an original image.
+ Images loaded from a file or from memory are marked \p original as
+ opposed to images created as a copy of another image with different
+ size (width or height).
+ \note This is useful for debugging (rarely used in user code).
+ \since FLTK 1.4.0
+ */
+ int original() { return original_; }
+
void release();
void reload();