diff options
author | jstebbins <[email protected]> | 2009-06-04 18:45:02 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-06-04 18:45:02 +0000 |
commit | f1a347e745c0570ffaaac9bd270f4d8578d3d1b3 (patch) | |
tree | f3adc96e16509b2b65b0f894839c0f7223d0c03d /gtk/src/hb-backend.c | |
parent | 528abac32d97db1606c2f26143512594529fa304 (diff) |
LinGui:
fix a couple problems with showing the cropped region in the preview
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2484 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r-- | gtk/src/hb-backend.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 7746af2cd..4b2e607c2 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -3116,12 +3116,17 @@ set_preview_job_settings(hb_job_t *job, GValue *settings) job->height = ghb_settings_get_int(settings, "scale_height"); if (ghb_settings_get_boolean(settings, "show_crop")) { + gdouble xscale = (gdouble)job->width / + (gdouble)(job->title->width - job->crop[2] - job->crop[3]); + gdouble yscale = (gdouble)job->height / + (gdouble)(job->title->height - job->crop[0] - job->crop[1]); + + job->width += xscale * (job->crop[2] + job->crop[3]); + job->height += yscale * (job->crop[0] + job->crop[1]); job->crop[0] = 0; job->crop[1] = 0; job->crop[2] = 0; job->crop[3] = 0; - job->width = job->title->width; - job->height = job->title->height; job->anamorphic.modulus = 2; } |