summaryrefslogtreecommitdiff
path: root/gtk2_ardour/fft_graph.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-07-24 12:59:52 +0200
committerRobin Gareus <robin@gareus.org>2016-07-24 13:00:15 +0200
commit7897b750ea4d5cc97c3cb43e930d398a0b6540e9 (patch)
treed012f2ed255850393c8f7294dbb3325fa878ddef /gtk2_ardour/fft_graph.h
parent46d2b03af0f2e4d9495b447724d0fa275ea774ff (diff)
rework FFT-graph, add pointer-position annotations
* replace old Gdk graphics context with cairo drawing * cache graph on an image-surface * allow partial exposure * add annotation overlay
Diffstat (limited to 'gtk2_ardour/fft_graph.h')
-rw-r--r--gtk2_ardour/fft_graph.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk2_ardour/fft_graph.h b/gtk2_ardour/fft_graph.h
index 75cda4d457..f5be5c62c4 100644
--- a/gtk2_ardour/fft_graph.h
+++ b/gtk2_ardour/fft_graph.h
@@ -50,6 +50,9 @@ public:
void redraw ();
bool on_expose_event (GdkEventExpose* event);
+ bool on_motion_notify_event (GdkEventMotion*);
+ bool on_leave_notify_event (GdkEventCrossing*);
+ bool on_button_press_event (GdkEventButton*) { return true; }
void on_size_request (Gtk::Requisition* requisition);
void on_size_allocate (Gtk::Allocation & alloc);
@@ -65,7 +68,7 @@ private:
void setWindowSize_internal (int windowSize);
- int draw_scales (Glib::RefPtr<Gdk::Window> window);
+ int draw_scales (cairo_t*);
static const int minScaleWidth = 512;
static const int minScaleHeight = 420;
@@ -75,15 +78,21 @@ private:
static const int v_margin = 12;
int currentScaleWidth;
- Glib::RefPtr<Gdk::GC> graph_gc;
int width;
int height;
+ int _yoff;
+ int _ann_x;
+ int _ann_y;
+ cairo_rectangle_t _ann_area;
+
unsigned int _windowSize;
unsigned int _dataSize;
Glib::RefPtr<Pango::Layout> layout;
+ cairo_surface_t* _surface;
+
AnalysisWindow *_a_window;
fftwf_plan _plan;