aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-10-05 04:16:08 -0400
committerDavid Robillard <d@drobilla.net>2016-10-05 04:16:08 -0400
commitc0f221b0649049ed76be91021dbd516884e97552 (patch)
tree3fe2310653d4cf71c4ee6b78ed6645ccf5d201ed
parent472556ff28b99db416d6f0a926c32ea28698e1a3 (diff)
downloadlv2-c0f221b0649049ed76be91021dbd516884e97552.tar.xz
Draw waveform aligned to pixel grid
-rw-r--r--plugins/eg-sampler.lv2/sampler_ui.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/eg-sampler.lv2/sampler_ui.c b/plugins/eg-sampler.lv2/sampler_ui.c
index 2373a4d..5723223 100644
--- a/plugins/eg-sampler.lv2/sampler_ui.c
+++ b/plugins/eg-sampler.lv2/sampler_ui.c
@@ -123,6 +123,9 @@ on_canvas_expose(GtkWidget* widget, GdkEventExpose* event, gpointer data)
cairo_t* cr = gdk_cairo_create(gtk_widget_get_window(widget));
+ cairo_set_line_width(cr, 1.0);
+ cairo_translate(cr, 0.5, 0.5);
+
const int mid_y = size.height / 2;
const float* const peaks = ui->precv.peaks;