projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
give WindowProxy its own map/unmap signals so that other things can track map/unmap...
[ardour.git]
/
libs
/
canvas
/
canvas
/
image.h
diff --git
a/libs/canvas/canvas/image.h
b/libs/canvas/canvas/image.h
index 0dcf8e51b33f4ef01133d8a2bbd265e84d7386a5..292de567230b8faea47ec1d5a4cc77a0050a5e89 100644
(file)
--- a/
libs/canvas/canvas/image.h
+++ b/
libs/canvas/canvas/image.h
@@
-23,6
+23,7
@@
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
+#include "canvas/visibility.h"
#include "canvas/item.h"
typedef void (*ImageReleaseCallback)(uint8_t *d, void *arg);
#include "canvas/item.h"
typedef void (*ImageReleaseCallback)(uint8_t *d, void *arg);
@@
-30,11
+31,12
@@
typedef void (*ImageReleaseCallback)(uint8_t *d, void *arg);
namespace ArdourCanvas {
namespace ArdourCanvas {
-class Image : public Item
+class
LIBCANVAS_API
Image : public Item
{
public:
{
public:
- Image (Group *, Cairo::Format, int width, int height);
-
+ Image (Canvas *, Cairo::Format, int width, int height);
+ Image (Item*, Cairo::Format, int width, int height);
+
struct Data {
Data (uint8_t *d, int w, int h, int s, Cairo::Format fmt)
: data (d)
struct Data {
Data (uint8_t *d, int w, int h, int s, Cairo::Format fmt)
: data (d)
@@
-63,12
+65,12
@@
public:
void* destroy_arg;
};
void* destroy_arg;
};
- /**
- * Returns a shared_ptr to a Data object that can be used to
+ /**
+ * Returns a shared_ptr to a Data object that can be used to
* write image data to. The Data object will contain a pointer
* to the buffer, along with image properties that may be
* useful during the data writing.
* write image data to. The Data object will contain a pointer
* to the buffer, along with image properties that may be
* useful during the data writing.
- *
+ *
* Can be called from any thread BUT ..
*
* ... to avoid collisions with Image deletion, some synchronization method
* Can be called from any thread BUT ..
*
* ... to avoid collisions with Image deletion, some synchronization method
@@
-90,12
+92,11
@@
public:
void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
void compute_bounding_box () const;
void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
void compute_bounding_box () const;
-
+
private:
Cairo::Format _format;
int _width;
int _height;
private:
Cairo::Format _format;
int _width;
int _height;
- int _data;
mutable boost::shared_ptr<Data> _current;
boost::shared_ptr<Data> _pending;
mutable bool _need_render;
mutable boost::shared_ptr<Data> _current;
boost::shared_ptr<Data> _pending;
mutable bool _need_render;