[gegl] gcut: fix horizontal scale of thumbtrack for seconds
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gcut: fix horizontal scale of thumbtrack for seconds
- Date: Thu, 27 Jul 2017 19:49:27 +0000 (UTC)
commit 579000ed4d273bdb41aecb8d0f4dbf3ebfc035a2
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Jul 27 21:49:12 2017 +0200
gcut: fix horizontal scale of thumbtrack for seconds
gcut/gcut-ui.c | 2 +-
gcut/gcut.c | 8 ++++----
gcut/gcut.h | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gcut/gcut-ui.c b/gcut/gcut-ui.c
index 6906364..248b991 100644
--- a/gcut/gcut-ui.c
+++ b/gcut/gcut-ui.c
@@ -1245,7 +1245,7 @@ static void render_clip (Mrg *mrg, GeglEDL *edl, const char *clip_path, double c
//cairo_matrix_init_rotate (&matrix, M_PI / 2); /* compensate for .. */
//cairo_matrix_translate (&matrix, 0, -width); /* vertical format */
- cairo_matrix_init_scale (&matrix, 1.0, height* 1.0/ VID_HEIGHT);
+ cairo_matrix_init_scale (&matrix, 1.0 * edl->fps, height* 1.0/ VID_HEIGHT);
cairo_matrix_translate (&matrix, -(x - clip_start), -y);
cairo_pattern_set_matrix (pattern, &matrix);
cairo_pattern_set_filter (pattern, CAIRO_FILTER_NEAREST);
diff --git a/gcut/gcut.c b/gcut/gcut.c
index d47720b..5acb549 100644
--- a/gcut/gcut.c
+++ b/gcut/gcut.c
@@ -1441,14 +1441,14 @@ char *gcut_serialize (GeglEDL *edl)
g_string_append_printf (ser, "fps=%f\n", gcut_get_fps (edl));
if (edl->range_start != DEFAULT_range_start)
- g_string_append_printf (ser, "range-start=%i\n", edl->range_start);
+ g_string_append_printf (ser, "range-start=%.3f\n", edl->range_start);
if (edl->range_end != DEFAULT_range_end)
- g_string_append_printf (ser, "range-end=%i\n", edl->range_end);
+ g_string_append_printf (ser, "range-end=%.3f\n", edl->range_end);
if (edl->selection_start != DEFAULT_selection_start)
- g_string_append_printf (ser, "selection-start=%i\n", edl->selection_start);
+ g_string_append_printf (ser, "selection-start=%.3f\n", edl->selection_start);
if (edl->selection_end != DEFAULT_selection_end)
- g_string_append_printf (ser, "selection-end=%i\n", edl->selection_end);
+ g_string_append_printf (ser, "selection-end=%.3f\n", edl->selection_end);
if (edl->scale != 1.0)
g_string_append_printf (ser, "frame-scale=%f\n", edl->scale);
if (edl->t0 != 1.0)
diff --git a/gcut/gcut.h b/gcut/gcut.h
index 76875ca..8312f23 100644
--- a/gcut/gcut.h
+++ b/gcut/gcut.h
@@ -199,10 +199,10 @@ struct _GeglEDL
int height;
GeglNode *cache_loader;
int cache_flags;
- int selection_start;
- int selection_end;
- int range_start;
- int range_end;
+ double selection_start;
+ double selection_end;
+ double range_start;
+ double range_end;
const char *output_path;
const char *video_codec;
const char *audio_codec;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]