[med-svn] [SCM] aghermann branch, master, updated. c0bd21ca8eb529ade7e0c7aad22951a308a8dc8f
Andrei Zavada
johnhommer at gmail.com
Wed May 1 00:09:37 UTC 2013
The following commit has been merged in the master branch:
commit d267babf9d107458c8a81ab55b0b63badd155acf
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Fri Apr 26 01:47:01 2013 +0300
improve drawing of annotations on hypnogram
diff --git a/src/ui/sf/hypnogram.cc b/src/ui/sf/hypnogram.cc
index 2ce9104..47ff34a 100644
--- a/src/ui/sf/hypnogram.cc
+++ b/src/ui/sf/hypnogram.cc
@@ -76,7 +76,7 @@ draw_hypnogram( cairo_t *cr)
// extra: annotations
{
- _p.CwB[SExpDesignUI::TColour::sf_annotations].set_source_rgba( cr);
+ _p.CwB[SExpDesignUI::TColour::sf_annotations].set_source_rgba( cr, .9);
cairo_set_line_width( cr, 18.);
auto total_seconds = total_pages() * pagesize();
@@ -87,6 +87,15 @@ draw_hypnogram( cairo_t *cr)
}
}
cairo_stroke( cr);
+
+ _p.CwB[SExpDesignUI::TColour::sf_embedded_annotations].set_source_rgba( cr, .9);
+ for ( auto &SA : common_annotations ) {
+ auto& A = *SA.second;
+ cairo_move_to( cr, A.span.a / total_seconds * da_wd - 1, 4); // extend by one pixel to prevent
+ cairo_line_to( cr, A.span.z / total_seconds * da_wd + 1, 4); // zero-length annotations to vanish
+ }
+
+ cairo_stroke( cr);
}
// extra: artifacts
@@ -97,8 +106,8 @@ draw_hypnogram( cairo_t *cr)
auto total_seconds = total_pages() * pagesize();
for ( auto &H : channels ) {
for ( auto &A : H.artifacts() ) {
- cairo_move_to( cr, A.a / total_seconds * da_wd, 12);
- cairo_line_to( cr, A.z / total_seconds * da_wd, 12);
+ cairo_move_to( cr, A.a / total_seconds * da_wd - 1, 12);
+ cairo_line_to( cr, A.z / total_seconds * da_wd + 1, 12);
}
}
cairo_stroke( cr);
--
Sleep experiment manager
More information about the debian-med-commit
mailing list