Added more configurable default values for ASS/SSA (outline/shadow witdh + opaque box)

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@2163 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2013-11-02 14:39:04 +00:00
parent 50502b519e
commit 2441a0a61d
9 changed files with 274 additions and 43 deletions

View File

@ -214,9 +214,14 @@
this.comboBoxWordListLanguage = new System.Windows.Forms.ComboBox();
this.tabPageSsaStyle = new System.Windows.Forms.TabPage();
this.groupBoxSsaStyle = new System.Windows.Forms.GroupBox();
this.labelSSAExample = new System.Windows.Forms.Label();
this.checkBoxSsaOpaqueBox = new System.Windows.Forms.CheckBox();
this.groupBoxPreview = new System.Windows.Forms.GroupBox();
this.pictureBoxPreview = new System.Windows.Forms.PictureBox();
this.labelSsaOutline = new System.Windows.Forms.Label();
this.numericUpDownSsaShadow = new System.Windows.Forms.NumericUpDown();
this.numericUpDownSsaOutline = new System.Windows.Forms.NumericUpDown();
this.labelSsaShadow = new System.Windows.Forms.Label();
this.labelSSAFont = new System.Windows.Forms.Label();
this.labelExampleColon = new System.Windows.Forms.Label();
this.buttonSSAChooseColor = new System.Windows.Forms.Button();
this.buttonSSAChooseFont = new System.Windows.Forms.Button();
this.tabPageProxy = new System.Windows.Forms.TabPage();
@ -294,6 +299,10 @@
this.groupBoxNamesIgonoreLists.SuspendLayout();
this.tabPageSsaStyle.SuspendLayout();
this.groupBoxSsaStyle.SuspendLayout();
this.groupBoxPreview.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownSsaShadow)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownSsaOutline)).BeginInit();
this.tabPageProxy.SuspendLayout();
this.groupBoxProxySettings.SuspendLayout();
this.groupBoxProxyAuthentication.SuspendLayout();
@ -2392,9 +2401,13 @@
//
// groupBoxSsaStyle
//
this.groupBoxSsaStyle.Controls.Add(this.labelSSAExample);
this.groupBoxSsaStyle.Controls.Add(this.checkBoxSsaOpaqueBox);
this.groupBoxSsaStyle.Controls.Add(this.groupBoxPreview);
this.groupBoxSsaStyle.Controls.Add(this.labelSsaOutline);
this.groupBoxSsaStyle.Controls.Add(this.numericUpDownSsaShadow);
this.groupBoxSsaStyle.Controls.Add(this.numericUpDownSsaOutline);
this.groupBoxSsaStyle.Controls.Add(this.labelSsaShadow);
this.groupBoxSsaStyle.Controls.Add(this.labelSSAFont);
this.groupBoxSsaStyle.Controls.Add(this.labelExampleColon);
this.groupBoxSsaStyle.Controls.Add(this.buttonSSAChooseColor);
this.groupBoxSsaStyle.Controls.Add(this.buttonSSAChooseFont);
this.groupBoxSsaStyle.Location = new System.Drawing.Point(6, 6);
@ -2404,17 +2417,81 @@
this.groupBoxSsaStyle.TabStop = false;
this.groupBoxSsaStyle.Text = "Sub Station Alpha style";
//
// labelSSAExample
// checkBoxSsaOpaqueBox
//
this.labelSSAExample.BackColor = System.Drawing.Color.Black;
this.labelSSAExample.Font = new System.Drawing.Font("Tahoma", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelSSAExample.ForeColor = System.Drawing.Color.White;
this.labelSSAExample.Location = new System.Drawing.Point(23, 155);
this.labelSSAExample.Name = "labelSSAExample";
this.labelSSAExample.Size = new System.Drawing.Size(737, 101);
this.labelSSAExample.TabIndex = 4;
this.labelSSAExample.Text = "Testing 123...";
this.labelSSAExample.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.checkBoxSsaOpaqueBox.Location = new System.Drawing.Point(275, 91);
this.checkBoxSsaOpaqueBox.Name = "checkBoxSsaOpaqueBox";
this.checkBoxSsaOpaqueBox.Size = new System.Drawing.Size(90, 17);
this.checkBoxSsaOpaqueBox.TabIndex = 0;
this.checkBoxSsaOpaqueBox.Text = "Opaque box";
this.checkBoxSsaOpaqueBox.UseVisualStyleBackColor = true;
this.checkBoxSsaOpaqueBox.CheckedChanged += new System.EventHandler(this.checkBoxSsaOpaqueBox_CheckedChanged);
//
// groupBoxPreview
//
this.groupBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxPreview.Controls.Add(this.pictureBoxPreview);
this.groupBoxPreview.Location = new System.Drawing.Point(17, 114);
this.groupBoxPreview.Name = "groupBoxPreview";
this.groupBoxPreview.Size = new System.Drawing.Size(790, 312);
this.groupBoxPreview.TabIndex = 10;
this.groupBoxPreview.TabStop = false;
this.groupBoxPreview.Text = "Preview";
//
// pictureBoxPreview
//
this.pictureBoxPreview.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBoxPreview.Location = new System.Drawing.Point(3, 17);
this.pictureBoxPreview.Name = "pictureBoxPreview";
this.pictureBoxPreview.Size = new System.Drawing.Size(784, 292);
this.pictureBoxPreview.TabIndex = 0;
this.pictureBoxPreview.TabStop = false;
//
// labelSsaOutline
//
this.labelSsaOutline.AutoSize = true;
this.labelSsaOutline.Location = new System.Drawing.Point(272, 40);
this.labelSsaOutline.Name = "labelSsaOutline";
this.labelSsaOutline.Size = new System.Drawing.Size(41, 13);
this.labelSsaOutline.TabIndex = 9;
this.labelSsaOutline.Text = "Outline";
//
// numericUpDownSsaShadow
//
this.numericUpDownSsaShadow.Location = new System.Drawing.Point(319, 63);
this.numericUpDownSsaShadow.Maximum = new decimal(new int[] {
9,
0,
0,
0});
this.numericUpDownSsaShadow.Name = "numericUpDownSsaShadow";
this.numericUpDownSsaShadow.Size = new System.Drawing.Size(44, 21);
this.numericUpDownSsaShadow.TabIndex = 8;
this.numericUpDownSsaShadow.ValueChanged += new System.EventHandler(this.numericUpDownSsaShadow_ValueChanged);
//
// numericUpDownSsaOutline
//
this.numericUpDownSsaOutline.Location = new System.Drawing.Point(319, 36);
this.numericUpDownSsaOutline.Maximum = new decimal(new int[] {
9,
0,
0,
0});
this.numericUpDownSsaOutline.Name = "numericUpDownSsaOutline";
this.numericUpDownSsaOutline.Size = new System.Drawing.Size(44, 21);
this.numericUpDownSsaOutline.TabIndex = 6;
this.numericUpDownSsaOutline.ValueChanged += new System.EventHandler(this.numericUpDownSsaOutline_ValueChanged);
//
// labelSsaShadow
//
this.labelSsaShadow.AutoSize = true;
this.labelSsaShadow.Location = new System.Drawing.Point(272, 65);
this.labelSsaShadow.Name = "labelSsaShadow";
this.labelSsaShadow.Size = new System.Drawing.Size(45, 13);
this.labelSsaShadow.TabIndex = 7;
this.labelSsaShadow.Text = "Shadow";
//
// labelSSAFont
//
@ -2425,15 +2502,6 @@
this.labelSSAFont.TabIndex = 3;
this.labelSSAFont.Text = "label16";
//
// labelExampleColon
//
this.labelExampleColon.AutoSize = true;
this.labelExampleColon.Location = new System.Drawing.Point(25, 137);
this.labelExampleColon.Name = "labelExampleColon";
this.labelExampleColon.Size = new System.Drawing.Size(51, 13);
this.labelExampleColon.TabIndex = 2;
this.labelExampleColon.Text = "Example:";
//
// buttonSSAChooseColor
//
this.buttonSSAChooseColor.Location = new System.Drawing.Point(26, 73);
@ -3008,6 +3076,10 @@
this.tabPageSsaStyle.ResumeLayout(false);
this.groupBoxSsaStyle.ResumeLayout(false);
this.groupBoxSsaStyle.PerformLayout();
this.groupBoxPreview.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownSsaShadow)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownSsaOutline)).EndInit();
this.tabPageProxy.ResumeLayout(false);
this.groupBoxProxySettings.ResumeLayout(false);
this.groupBoxProxySettings.PerformLayout();
@ -3073,9 +3145,7 @@
private System.Windows.Forms.ComboBox comboBoxEncoding;
private System.Windows.Forms.CheckBox checkBoxRememberRecentFiles;
private System.Windows.Forms.GroupBox groupBoxSsaStyle;
private System.Windows.Forms.Label labelSSAExample;
private System.Windows.Forms.Label labelSSAFont;
private System.Windows.Forms.Label labelExampleColon;
private System.Windows.Forms.Button buttonSSAChooseColor;
private System.Windows.Forms.Button buttonSSAChooseFont;
private System.Windows.Forms.ColorDialog colorDialogSSAStyle;
@ -3252,5 +3322,12 @@
private System.Windows.Forms.Label labelWaveformBorderHitMs2;
private System.Windows.Forms.NumericUpDown numericUpDownWaveformBorderHitMs;
private System.Windows.Forms.Label labelWaveformBorderHitMs1;
private System.Windows.Forms.Label labelSsaOutline;
private System.Windows.Forms.NumericUpDown numericUpDownSsaShadow;
private System.Windows.Forms.NumericUpDown numericUpDownSsaOutline;
private System.Windows.Forms.Label labelSsaShadow;
private System.Windows.Forms.GroupBox groupBoxPreview;
private System.Windows.Forms.PictureBox pictureBoxPreview;
private System.Windows.Forms.CheckBox checkBoxSsaOpaqueBox;
}
}

View File

@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
using System.Globalization;
using System.IO;
using System.Text;
@ -154,9 +156,13 @@ namespace Nikse.SubtitleEdit.Forms
_ssaFontColor = ssa.SsaFontColorArgb;
fontDialogSSAStyle.Font = new System.Drawing.Font(ssa.SsaFontName, (float)ssa.SsaFontSize);
fontDialogSSAStyle.Color = System.Drawing.Color.FromArgb(_ssaFontColor);
if (ssa.SsaOutline >= numericUpDownSsaOutline.Minimum && ssa.SsaOutline <= numericUpDownSsaOutline.Maximum)
numericUpDownSsaOutline.Value = ssa.SsaOutline;
if (ssa.SsaShadow >= numericUpDownSsaShadow.Minimum && ssa.SsaShadow <= numericUpDownSsaShadow.Maximum)
numericUpDownSsaShadow.Value = ssa.SsaShadow;
checkBoxSsaOpaqueBox.Checked = ssa.SsaOpaqueBox;
UpdateSsaExample();
var proxy = Configuration.Settings.Proxy;
textBoxProxyAddress.Text = proxy.ProxyAddress;
textBoxProxyUserName.Text = proxy.UserName;
@ -316,8 +322,13 @@ namespace Nikse.SubtitleEdit.Forms
groupBoxSsaStyle.Text = language.SubStationAlphaStyle;
buttonSSAChooseFont.Text = language.ChooseFont;
buttonSSAChooseColor.Text = language.ChooseColor;
labelExampleColon.Text = language.Example;
labelSSAExample.Text = language.Testing123;
if (language.SsaOutline != null) // TODO: Remove in SE 3.4
{
labelSsaOutline.Text = language.SsaOutline;
labelSsaShadow.Text = language.SsaShadow;
checkBoxSsaOpaqueBox.Text = language.SsaOpaqueBox;
}
groupBoxWordLists.Text = language.WordLists;
labelWordListLanguage.Text = language.Language;
@ -988,6 +999,9 @@ namespace Nikse.SubtitleEdit.Forms
ssa.SsaFontName = _ssaFontName;
ssa.SsaFontSize = _ssaFontSize;
ssa.SsaFontColorArgb = _ssaFontColor;
ssa.SsaOutline = (int)numericUpDownSsaOutline.Value;
ssa.SsaShadow = (int)numericUpDownSsaShadow.Value;
ssa.SsaOpaqueBox = checkBoxSsaOpaqueBox.Checked;
ProxySettings proxy = Configuration.Settings.Proxy;
proxy.ProxyAddress = textBoxProxyAddress.Text ;
@ -1352,20 +1366,113 @@ namespace Nikse.SubtitleEdit.Forms
private void UpdateSsaExample()
{
labelSSAExample.ForeColor = System.Drawing.Color.FromArgb(_ssaFontColor);
labelSSAExample.Font = new System.Drawing.Font(_ssaFontName, (float)_ssaFontSize);
labelSSAFont.Text = string.Format("{0}, size {1}", fontDialogSSAStyle.Font.Name, fontDialogSSAStyle.Font.Size);
GeneratePreviewReal();
}
labelSSAFont.Text = string.Format("{0}, size {1}",
fontDialogSSAStyle.Font.Name,
fontDialogSSAStyle.Font.Size);
private void GeneratePreviewReal()
{
if (pictureBoxPreview.Image != null)
pictureBoxPreview.Image.Dispose();
var bmp = new Bitmap(pictureBoxPreview.Width, pictureBoxPreview.Height);
using (Graphics g = Graphics.FromImage(bmp))
{
// Draw background
const int rectangleSize = 9;
for (int y = 0; y < bmp.Height; y += rectangleSize)
{
for (int x = 0; x < bmp.Width; x += rectangleSize)
{
Color c = Color.WhiteSmoke;
if (y % (rectangleSize * 2) == 0)
{
if (x % (rectangleSize * 2) == 0)
c = Color.LightGray;
}
else
{
if (x % (rectangleSize * 2) != 0)
c = Color.LightGray;
}
g.FillRectangle(new SolidBrush(c), x, y, rectangleSize, rectangleSize);
}
}
// Draw text
Font font;
try
{
font = new Font(_ssaFontName, (float)_ssaFontSize);
}
catch
{
font = new Font(Font, FontStyle.Regular);
}
g.TextRenderingHint = TextRenderingHint.AntiAlias;
g.SmoothingMode = SmoothingMode.AntiAlias;
var sf = new StringFormat { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Near };
var path = new GraphicsPath();
bool newLine = false;
var sb = new StringBuilder();
sb.Append("This is a test!");
bool bold = false;
bool italic = false;
bool underline = false;
var measuredWidth = TextDraw.MeasureTextWidth(font, sb.ToString(), bold) + 1;
var measuredHeight = TextDraw.MeasureTextHeight(font, sb.ToString(), bold) + 1;
float left = 5;
left = ((float)(bmp.Width - measuredWidth * 0.8 + 15) / 2);
float top = 2;
top = bmp.Height - measuredHeight - ((int)10);
int leftMargin = 0;
int pathPointsStart = -1;
if (checkBoxSsaOpaqueBox.Checked)
{
g.FillRectangle(new SolidBrush(Color.Black), left, top, measuredWidth + 3, measuredHeight + 3);
}
TextDraw.DrawText(font, sf, path, sb, italic, bold, underline, left, top, ref newLine, leftMargin, ref pathPointsStart);
int outline = (int)numericUpDownSsaOutline.Value;
// draw shadow
if (numericUpDownSsaShadow.Value > 0 && !checkBoxSsaOpaqueBox.Checked)
{
for (int i = 0; i < (int)numericUpDownSsaShadow.Value; i++)
{
var shadowPath = new GraphicsPath();
sb = new StringBuilder();
sb.Append("This is a test!");
int pathPointsStart2 = -1;
TextDraw.DrawText(font, sf, shadowPath, sb, italic, bold, underline, left + i + outline, top + i + outline, ref newLine, leftMargin, ref pathPointsStart2);
g.FillPath(new SolidBrush(Color.FromArgb(200, Color.Black)), shadowPath);
}
}
if (outline > 0 && !checkBoxSsaOpaqueBox.Checked)
{
g.DrawPath(new Pen(Color.Black, outline), path);
}
g.FillPath(new SolidBrush(System.Drawing.Color.FromArgb(_ssaFontColor)), path);
}
pictureBoxPreview.Image = bmp;
}
private void ButtonSsaChooseColorClick(object sender, EventArgs e)
{
colorDialogSSAStyle.Color = labelSSAExample.ForeColor;
colorDialogSSAStyle.Color = System.Drawing.Color.FromArgb(_ssaFontColor);
if (colorDialogSSAStyle.ShowDialog() == DialogResult.OK)
{
labelSSAExample.ForeColor = colorDialogSSAStyle.Color;
_ssaFontColor = colorDialogSSAStyle.Color.ToArgb();
UpdateSsaExample();
}
@ -2316,5 +2423,22 @@ namespace Nikse.SubtitleEdit.Forms
}
}
private void numericUpDownSsaOutline_ValueChanged(object sender, EventArgs e)
{
UpdateSsaExample();
}
private void numericUpDownSsaShadow_ValueChanged(object sender, EventArgs e)
{
UpdateSsaExample();
}
private void checkBoxSsaOpaqueBox_CheckedChanged(object sender, EventArgs e)
{
numericUpDownSsaOutline.Enabled = !checkBoxSsaOpaqueBox.Checked;
numericUpDownSsaShadow.Enabled = !checkBoxSsaOpaqueBox.Checked;
UpdateSsaExample();
}
}
}

View File

@ -1336,7 +1336,7 @@ Fortsæt?</SubtitleAppendPrompt>
<WaveformAndSpectrogram>Waveform/spektrogram</WaveformAndSpectrogram>
<Tools>Værktøj</Tools>
<WordLists>Ordlister</WordLists>
<SsaStyle>SSA Style</SsaStyle>
<SsaStyle>ASS/SSA Style</SsaStyle>
<Proxy>Proxy</Proxy>
<ShowToolBarButtons>Vis Værktøjslinjeknapperne</ShowToolBarButtons>
<New>Ny</New>

View File

@ -1246,7 +1246,7 @@
<WaveformAndSpectrogram>Golfvorm/spectrogram</WaveformAndSpectrogram>
<Tools>Gereedschappen</Tools>
<WordLists>Woordenlijsten</WordLists>
<SsaStyle>SSA Style</SsaStyle>
<SsaStyle>ASS/SSA Style</SsaStyle>
<Proxy>Proxy</Proxy>
<ShowToolBarButtons>Toon werkbalk knoppen</ShowToolBarButtons>
<New>Nieuw</New>

View File

@ -1596,7 +1596,7 @@ can edit in same subtitle file (collaboration)",
WaveformAndSpectrogram = "Waveform/spectrogram",
Tools = "Tools",
WordLists = "Word lists",
SsaStyle = "SSA Style",
SsaStyle = "ASS/SSA Style",
Proxy = "Proxy",
ShowToolBarButtons = "Show tool bar buttons",
New = "New",
@ -1686,7 +1686,9 @@ can edit in same subtitle file (collaboration)",
SubStationAlphaStyle = "Sub Station Alpha style",
ChooseFont = "Choose font",
ChooseColor = "Choose color",
Example = "Example",
SsaOutline = "Outline",
SsaShadow = "Shadow",
SsaOpaqueBox = "Opaque box",
Testing123 = "Testing 123...",
Language = "Language",
NamesIgnoreLists = "Names/ignore list (case sensitive)",

View File

@ -1584,7 +1584,9 @@
public string SubStationAlphaStyle { get; set; }
public string ChooseFont { get; set; }
public string ChooseColor { get; set; }
public string Example { get; set; }
public string SsaOutline { get; set; }
public string SsaShadow { get; set; }
public string SsaOpaqueBox { get; set; }
public string Testing123 { get; set; }
public string Language { get; set; }
public string NamesIgnoreLists { get; set; }

View File

@ -194,6 +194,9 @@ namespace Nikse.SubtitleEdit.Logic
public string SsaFontName { get; set; }
public double SsaFontSize { get; set; }
public int SsaFontColorArgb { get; set; }
public int SsaOutline { get; set; }
public int SsaShadow { get; set; }
public bool SsaOpaqueBox { get; set; }
public string DCinemaFontFile { get; set; }
public string DCinemaLoadFontResource { get; set; }
public int DCinemaFontSize { get; set; }
@ -231,6 +234,9 @@ namespace Nikse.SubtitleEdit.Logic
SsaFontName = "Arial";
SsaFontSize = 20;
SsaFontColorArgb = System.Drawing.Color.FromArgb(255, 255, 255).ToArgb();
SsaOutline = 2;
SsaShadow = 1;
SsaOpaqueBox = false;
DCinemaFontFile = "Arial.ttf";
DCinemaLoadFontResource = "urn:uuid:3dec6dc0-39d0-498d-97d0-928d2eb78391";
@ -1501,6 +1507,15 @@ namespace Nikse.SubtitleEdit.Logic
subNode = node.SelectSingleNode("SsaFontColorArgb");
if (subNode != null)
settings.SubtitleSettings.SsaFontColorArgb = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("SsaOutline");
if (subNode != null)
settings.SubtitleSettings.SsaOutline = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("SsaShadow");
if (subNode != null)
settings.SubtitleSettings.SsaShadow = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("SsaOpaqueBox");
if (subNode != null)
settings.SubtitleSettings.SsaOpaqueBox = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("DCinemaFontFile");
if (subNode != null)
settings.SubtitleSettings.DCinemaFontFile = subNode.InnerText;
@ -2415,6 +2430,9 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("SsaFontName", settings.SubtitleSettings.SsaFontName);
textWriter.WriteElementString("SsaFontSize", settings.SubtitleSettings.SsaFontSize.ToString(CultureInfo.InvariantCulture));
textWriter.WriteElementString("SsaFontColorArgb", settings.SubtitleSettings.SsaFontColorArgb.ToString());
textWriter.WriteElementString("SsaOutline", settings.SubtitleSettings.SsaOutline.ToString());
textWriter.WriteElementString("SsaShadow", settings.SubtitleSettings.SsaShadow.ToString());
textWriter.WriteElementString("SsaOpaqueBox", settings.SubtitleSettings.SsaOpaqueBox.ToString());
textWriter.WriteElementString("DCinemaFontFile", settings.SubtitleSettings.DCinemaFontFile);
textWriter.WriteElementString("DCinemaFontSize", settings.SubtitleSettings.DCinemaFontSize.ToString());
textWriter.WriteElementString("DCinemaBottomMargin", settings.SubtitleSettings.DCinemaBottomMargin.ToString());

View File

@ -37,12 +37,14 @@ namespace Nikse.SubtitleEdit.Logic
Outline = Color.Black;
Background = Color.Black;
Alignment = "2";
OutlineWidth = 2;
ShadowWidth = 2;
OutlineWidth = Configuration.Settings.SubtitleSettings.SsaOutline;
ShadowWidth = Configuration.Settings.SubtitleSettings.SsaShadow;
MarginLeft = 10;
MarginRight = 10;
MarginVertical = 10;
BorderStyle = "1";
if (Configuration.Settings.SubtitleSettings.SsaOpaqueBox)
BorderStyle = "3";
RawLine = string.Empty;
LoadedFromHeader = false;
}

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using System.Xml;
@ -15,10 +16,15 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
{
get
{
string borderStyle = "1"; // 1=normal, 3=opaque box
if (Configuration.Settings.SubtitleSettings.SsaOpaqueBox)
borderStyle = "3";
return "Style: Default," + Configuration.Settings.SubtitleSettings.SsaFontName + "," +
((int)Configuration.Settings.SubtitleSettings.SsaFontSize) + "," +
GetSsaColorString(Color.FromArgb(Configuration.Settings.SubtitleSettings.SsaFontColorArgb)) + "," +
"&H0300FFFF,&H00000000,&H02000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1";
"&H0300FFFF,&H00000000,&H02000000,0,0,0,0,100,100,0,0," + borderStyle + "," + Configuration.Settings.SubtitleSettings.SsaOutline.ToString(CultureInfo.InvariantCulture) + "," +
Configuration.Settings.SubtitleSettings.SsaShadow.ToString(CultureInfo.InvariantCulture) + ",2,10,10,10,1";
}
}