From acb2e3cb545b64fe94f399e18ae91577ffcac6d0 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 23 Nov 2022 16:53:24 +0100 Subject: GUI: Colour scale, part 2: Scrolling and zooming --- src/crystfelcolourscale.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/crystfelcolourscale.h') diff --git a/src/crystfelcolourscale.h b/src/crystfelcolourscale.h index 128db6d8..3bc03e29 100644 --- a/src/crystfelcolourscale.h +++ b/src/crystfelcolourscale.h @@ -54,6 +54,7 @@ #define COLSCALE_N_BINS (256) +#define COLSCALE_SAMPLE_SIZE (4096) struct _crystfelcolourscale { @@ -62,8 +63,13 @@ struct _crystfelcolourscale double visible_height; double drag_start_x; double drag_start_y; + double drag_min; + double lo; + double hi; int bins[COLSCALE_N_BINS]; + float *sample; + int n_samples; }; struct _crystfelcolourscaleclass @@ -84,4 +90,6 @@ extern void crystfel_colour_scale_get_range(CrystFELColourScale *cs, double scale_min, double scale_max); +extern void crystfel_colour_scale_auto_range(CrystFELColourScale *cs); + #endif /* CRYSTFELCOLOURSCALE_H */ -- cgit v1.2.3