/*
* CINELERRA
* Copyright (C) 1997-2012 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
this->mwindow = mwindow;
this->thread = thread;
presets = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Project and Media Attributes");
}
SetFormatWindow::~SetFormatWindow()
{
delete presets;
}
+/* W Ratio, H Ratio
+Sets the ratio of the new canvas size (W, H) to the old (previous) canvas size (W, H).
+The new canvas size is recalculated based upon a certain factor in the W Ratio,
+H Ratio fields. A practical use-case: The current resolution is 640x480, and for some reason
+you want it to be 1.33 times wider. You don't have to calculate what 640x1.33 is;
+you type 1.33 into the "W" input instead, and Cinelerra calculates it for you. */
+
void SetFormatWindow::create_objects()
{
lock_window("SetFormatWindow::create_objects");
_("Channels:")));
add_subwindow(channels = new SetChannelsTextBox(thread,
mwindow->theme->setformat_x2, y));
- add_subwindow(new BC_ITumbler(channels, 1, MAXCHANNELS,
+ add_subwindow(new BC_ITumbler(channels, 0, MAXCHANNELS,
mwindow->theme->setformat_x2 + channels->get_w(), y));
y += mwindow->theme->setformat_margin;
y += mwindow->theme->setformat_margin;
add_subwindow(new BC_Title(mwindow->theme->setformat_x3,
y,
- _("Aspect ratio:")));
+ _("Display Aspect ratio:")));
y += mwindow->theme->setformat_margin;
x = mwindow->theme->setformat_x3;
add_subwindow(aspect_w = new ScaleAspectText(x, y, thread,
(ArrayList<BC_ListBoxItem*>*)&mwindow->interlace_project_modes,
mwindow->theme->setformat_x4 + textbox->get_w(), y));
y += mwindow->theme->setformat_margin;
+
+ add_subwindow(new BC_Title(mwindow->theme->setformat_x3,
+ y+10,
+ _("Note: W/H ratio fields means multipliers \nrelative to previous canvas size \n")));
BC_OKTextButton *ok;
BC_CancelTextButton *cancel;
}
int SetChannelsTextBox::handle_event()
{
- int new_channels = CLIP(atoi(get_text()), 1, MAXCHANNELS);
-
+ int new_channels = CLIP(atoi(get_text()), 0, MAXCHANNELS);
thread->new_settings->session->audio_channels = new_channels;
-
-
- if(new_channels > 0)
- {
+ if(new_channels > 0) {
memcpy(thread->new_settings->session->achannel_positions,
&thread->mwindow->preferences->channel_positions[new_channels - 1],
sizeof(thread->new_settings->session->achannel_positions));
}
-
thread->window->canvas->draw();
return 1;
}