SET_TRACE
// Mandatory folders
- folders.append(picon = new AssetPicon(mwindow, this, _(AEFFECT_FOLDER)));
+ folders.append(picon = new AssetPicon(mwindow, this, AEFFECT_FOLDER));
picon->persistent = 1;
- folders.append(picon = new AssetPicon(mwindow, this, _(VEFFECT_FOLDER)));
+ folders.append(picon = new AssetPicon(mwindow, this, VEFFECT_FOLDER));
picon->persistent = 1;
- folders.append(picon = new AssetPicon(mwindow, this, _(ATRANSITION_FOLDER)));
+ folders.append(picon = new AssetPicon(mwindow, this, ATRANSITION_FOLDER));
picon->persistent = 1;
- folders.append(picon = new AssetPicon(mwindow, this, _(VTRANSITION_FOLDER)));
+ folders.append(picon = new AssetPicon(mwindow, this, VTRANSITION_FOLDER));
picon->persistent = 1;
- folders.append(picon = new AssetPicon(mwindow, this, _(LABEL_FOLDER)));
+ folders.append(picon = new AssetPicon(mwindow, this, LABEL_FOLDER));
picon->persistent = 1;
- folders.append(picon = new AssetPicon(mwindow, this, _(CLIP_FOLDER)));
+ folders.append(picon = new AssetPicon(mwindow, this, CLIP_FOLDER));
picon->persistent = 1;
- folders.append(picon = new AssetPicon(mwindow, this, _(MEDIA_FOLDER)));
+ folders.append(picon = new AssetPicon(mwindow, this, MEDIA_FOLDER));
picon->persistent = 1;
create_label_folder();
// Mandatory folders
-#define AEFFECT_FOLDER N_("Audio Effects")
-#define VEFFECT_FOLDER N_("Video Effects")
-#define ATRANSITION_FOLDER N_("Audio Transitions")
-#define VTRANSITION_FOLDER N_("Video Transitions")
+#define AEFFECT_FOLDER _("Audio Effects")
+#define VEFFECT_FOLDER _("Video Effects")
+#define ATRANSITION_FOLDER _("Audio Transitions")
+#define VTRANSITION_FOLDER _("Video Transitions")
-#define LABEL_FOLDER N_("Labels")
+#define LABEL_FOLDER _("Labels")
// Default folders
-#define CLIP_FOLDER N_("Clips")
-#define MEDIA_FOLDER N_("Media")
+#define CLIP_FOLDER _("Clips")
+#define MEDIA_FOLDER _("Media")
const char *GWindowGUI::other_text[NON_AUTOMATION_TOTAL] =
{
- "Assets",
- "Titles",
- "Transitions",
- "Plugin Autos"
+ N_("Assets"),
+ N_("Titles"),
+ N_("Transitions"),
+ N_("Plugin Autos")
};
const char *GWindowGUI::auto_text[AUTOMATION_TOTAL] =
{
- "Mute",
- "Camera X",
- "Camera Y",
- "Camera Z",
- "Projector X",
- "Projector Y",
- "Projector Z",
- "Fade",
- "Pan",
- "Mode",
- "Mask",
- "Speed"
+ N_("Mute"),
+ N_("Camera X"),
+ N_("Camera Y"),
+ N_("Camera Z"),
+ N_("Projector X"),
+ N_("Projector Y"),
+ N_("Projector Z"),
+ N_("Fade"),
+ N_("Pan"),
+ N_("Mode"),
+ N_("Mask"),
+ N_("Speed")
};
int GWindowGUI::auto_colors[AUTOMATION_TOTAL] =
case AUTOMATION_PAN: vframe = mwindow->theme->pankeyframe_data; break;
case AUTOMATION_MASK: vframe = mwindow->theme->maskkeyframe_data; break;
}
- const char *label = tp->isauto ? auto_text[tp->ref] : other_text[tp->ref] ;
+ const char *label = _(tp->isauto ? auto_text[tp->ref] : other_text[tp->ref]);
int color = !tp->isauto ? -1 : auto_colors[tp->ref];
GWindowToggle *toggle = new GWindowToggle(mwindow, this, x, y, label, color, tp);
add_tool(toggles[i] = toggle);
// Modes
+/*
+source
+x = porter duff operator
+g = good guy
+a = android
+* = hv 4.6.1
+
+cin 5.1 overlayframe TRANSFER_MODEs
+x DST [Da, Dc]
+x DST_ATOP [Sa, Sc * (1 - Da) + Dc * Sa]
+x DST_IN [Da * Sa, Dc * Sa]
+x DST_OUT [Da * (1 - Sa), Dc * (1 - Sa)]
+x DST_OVER [Sa * (1 - Da) + Da, Sc * (1 - Da) + Dc]
+x SRC [Sa, Sc]
+x SRC_ATOP [Da, Sc * Da + Dc * (1 - Sa)]
+x SRC_IN [Sa * Da, Sc * Da]
+x SRC_OUT [Sa * (1 - Da), Sc * (1 - Da)]
+x SRC_OVER [Sa + Da * (1 - Sa), Sc + (1 - Sa) * Dc]
+g OR [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]
+a XOR [Sa * (1 - Da) + Da * (1 - Sa), Sc * (1 - Da) + Dc * (1 Sa)]
+* NORMAL [Sa + Da * (1 - Sa), Sc * Sa + Dc * (1 Sa)])
+* ADDITION [(Sa + Da), (Sc + Dc)]
+* SUBTRACT [(Sa - Da), (Sc Dc)]
+* MULTIPLY [(Sa * Da), Sc * Dc]
+* DIVIDE [(Sa / Da), (Sc / Dc)]
+* REPLACE [Sa, Sc] (fade = 1)
+* MAX [max(Sa, Da), MAX(Sc, Dc)]
+* MIN [min(Sa, Da), MIN(Sc, Dc)]
+g AVERAGE [(Sa + Da) * 0.5, (Sc + Dc) * 0.5]
+a DARKEN [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + min(Sc, Dc)]
+a LIGHTEN [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + max(Sc, Dc)]
+
+https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html
+ ADD Saturate(S + D)
+ CLEAR [0, 0]
+ DARKEN [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + min(Sc, Dc)]
+ DST [Da, Dc]
+ DST_ATOP [Sa, Sa * Dc + Sc * (1 - Da)]
+ DST_IN [Sa * Da, Sa * Dc]
+ DST_OUT [Da * (1 - Sa), Dc * (1 - Sa)]
+ DST_OVER [Sa + (1 - Sa)*Da, Rc = Dc + (1 - Da)*Sc]
+ LIGHTEN [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + max(Sc, Dc)]
+ MULTIPLY [Sa * Da, Sc * Dc]
+ OVERLAY (defined, but unspecified in android)
+ SCREEN [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]
+ SRC [Sa, Sc]
+ SRC_ATOP [Da, Sc * Da + (1 - Sa) * Dc]
+ SRC_IN [Sa * Da, Sc * Da]
+ SRC_OUT [Sa * (1 - Da), Sc * (1 - Da)]
+ SRC_OVER [Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc]
+ XOR [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc]
+
+https://docs.gimp.org/2.6/en/gimp-concepts-layer-modes.html
+ Normal [M]
+ Dissolve [I + dots]
+ Multiply [M * I]
+ Divide [I / M]
+ Screen [1 - (1-M)*(1-I)]
+ Overlay [I * (I + 2*M*(1-I))]
+ Dodge [I / (1-M)]
+ Burn [1 - (1-I) / M]
+ Hard light [M>0.5 ? (1 - (1-2*(M-0.5))*(1 - I) : 2*M*I]
+ Soft light [((1-I)*M + Screen()) * I]
+ Grain extract [I - M + 0.5]
+ Grain merge [I + M - 0.5]
+ Difference [abs(I-M)]
+ Addition [min((I+M),1.0)]
+ Subtract [max((I-M),0.0)]
+ Darken only [min(M,I)]
+ Lighten only [max(M,I)]
+ Hue [hue(M) + sat(I)+val(I)]
+ Saturation [sat(M) + hue(I)+val(I)]
+ Color [hue(M)+sat(M) + val(I)]
+ Value [val(M) + sat(I)+hue(I)]
+
+*/
+
#define TRANSFER_TYPES 23
#define TRANSFER_NORMAL 0
int scr_w = mwindow->gui->get_screen_w(0, -1);
int scr_h = mwindow->gui->get_screen_h(0, -1);
- int x = scr_x + scr_w / 2 - WIDTH / 2;
- int y = scr_h / 2 - HEIGHT / 2;
+ int w = WIDTH, h = HEIGHT;
+ int min_w = mwindow->theme->preferencescategory_x;
+ for(int i = 0; i < CATEGORIES; i++) {
+ min_w += PreferencesButton::calculate_w(mwindow->gui, category_to_text(i)) -
+ mwindow->theme->preferences_category_overlap;
+ }
+ if( w < min_w ) w = min_w;
+ int x = scr_x + scr_w / 2 - w / 2;
+ int y = scr_h / 2 - h / 2;
- window = new PreferencesWindow(mwindow, this, x, y);
+ window = new PreferencesWindow(mwindow, this, x, y, w, h);
window->create_objects();
mwindow->gui->unlock_window();
PreferencesWindow::PreferencesWindow(MWindow *mwindow,
- PreferencesThread *thread,
- int x,
- int y)
- : BC_Window(_(PROGRAM_NAME ": Preferences"),
- x,y, WIDTH,HEIGHT, WIDTH,HEIGHT, 1,0,1)
+ PreferencesThread *thread, int x, int y, int w, int h)
+ : BC_Window(_(PROGRAM_NAME ": Preferences"), x,y, w,h, 1,0,1)
{
this->mwindow = mwindow;
this->thread = thread;
public:
PreferencesWindow(MWindow *mwindow,
PreferencesThread *thread,
- int x,
- int y);
+ int x, int y, int w, int h);
~PreferencesWindow();
void create_objects();
int y = 10, x = 10;
add_tool(new BC_Title(x, y, _("Select the range to transfer:"))); y += 25;
add_tool(new BC_Title(x, y, _("Track"))); x += 70;
- add_tool(new BC_Title(x, y, _("Min"))); x += 70;
- add_tool(new BC_Title(x, y, _("Sec"))); x += 100;
+ add_tool(new BC_Title(x, y, _("Min."))); x += 70;
+ add_tool(new BC_Title(x, y, _("Sec."))); x += 100;
add_tool(new BC_Title(x, y, _("Track"))); x += 70;
- add_tool(new BC_Title(x, y, _("Min"))); x += 70;
- add_tool(new BC_Title(x, y, _("Sec"))); x += 100;
+ add_tool(new BC_Title(x, y, _("Min."))); x += 70;
+ add_tool(new BC_Title(x, y, _("Sec."))); x += 100;
x = 10; y += 25;
add_tool(track1 = new CDRipTextValue(this, &(cdripper->track1), x, y, 50));