Commit 32319fd1 authored by tebjan's avatar tebjan
Browse files

normalized line endings

parent 2a58f88d
......@@ -30,265 +30,262 @@ namespace SvgW3CTestRunner
/// </summary>
private void InitializeComponent()
{
this.lstFiles = new System.Windows.Forms.ListBox();
this.boxConsoleLog = new System.Windows.Forms.RichTextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.picSaveLoad = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.picSvg = new System.Windows.Forms.PictureBox();
this.label3 = new System.Windows.Forms.Label();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.picSVGPNG = new System.Windows.Forms.PictureBox();
this.picPng = new System.Windows.Forms.PictureBox();
this.label2 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fIleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.runAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tableLayoutPanel1.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picSaveLoad)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picSvg)).BeginInit();
this.tableLayoutPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picSVGPNG)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picPng)).BeginInit();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// lstFiles
//
this.lstFiles.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstFiles.FormattingEnabled = true;
this.lstFiles.Location = new System.Drawing.Point(3, 3);
this.lstFiles.Name = "lstFiles";
this.lstFiles.Size = new System.Drawing.Size(174, 744);
this.lstFiles.TabIndex = 0;
this.lstFiles.SelectedIndexChanged += new System.EventHandler(this.lstFiles_SelectedIndexChanged);
//
// boxConsoleLog
//
this.boxConsoleLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.boxConsoleLog.Multiline = true;
this.boxConsoleLog.Location = new System.Drawing.Point(183, 744);
this.boxConsoleLog.Name = "ConsoleLog";
this.boxConsoleLog.Size = new System.Drawing.Size(1240, 144);
this.boxConsoleLog.TabIndex = 0;
this.boxConsoleLog.MouseDown += new System.Windows.Forms.MouseEventHandler (this.boxConsoleLog_MouseDown);
this.boxConsoleLog.ReadOnly = true;
this.boxConsoleLog.BackColor = Color.White;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 180F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.splitContainer1, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.lstFiles, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.boxConsoleLog, 1, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 24);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1249, 750+144);
this.tableLayoutPanel1.TabIndex = 1;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(183, 3);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.tableLayoutPanel3);
this.splitContainer1.Size = new System.Drawing.Size(1063, 744);
this.splitContainer1.SplitterDistance = 548;
this.splitContainer1.TabIndex = 0;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Controls.Add(this.picSaveLoad, 0, 3);
this.tableLayoutPanel2.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.picSvg, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.label3, 0, 2);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 4;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(548, 744);
this.tableLayoutPanel2.TabIndex = 0;
//
// picSaveLoad
//
this.picSaveLoad.BackColor = System.Drawing.Color.White;
this.picSaveLoad.Dock = System.Windows.Forms.DockStyle.Fill;
this.picSaveLoad.Location = new System.Drawing.Point(0, 385);
this.picSaveLoad.Margin = new System.Windows.Forms.Padding(0);
this.picSaveLoad.Name = "picSaveLoad";
this.picSaveLoad.Size = new System.Drawing.Size(548, 359);
this.picSaveLoad.TabIndex = 2;
this.picSaveLoad.TabStop = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(67, 13);
this.label1.TabIndex = 0;
this.label1.Text = "SVG Render";
//
// picSvg
//
this.picSvg.BackColor = System.Drawing.Color.White;
this.picSvg.Dock = System.Windows.Forms.DockStyle.Fill;
this.picSvg.Location = new System.Drawing.Point(0, 13);
this.picSvg.Margin = new System.Windows.Forms.Padding(0);
this.picSvg.Name = "picSvg";
this.picSvg.Size = new System.Drawing.Size(548, 359);
this.picSvg.TabIndex = 1;
this.picSvg.TabStop = false;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 372);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(80, 13);
this.label3.TabIndex = 3;
this.label3.Text = "Save and Load";
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.ColumnCount = 1;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Controls.Add(this.picSVGPNG, 0, 3);
this.tableLayoutPanel3.Controls.Add(this.picPng, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.label2, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.label4, 0, 2);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 4;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(511, 744);
this.tableLayoutPanel3.TabIndex = 0;
//
// picSVGPNG
//
this.picSVGPNG.BackColor = System.Drawing.Color.White;
this.picSVGPNG.Dock = System.Windows.Forms.DockStyle.Fill;
this.picSVGPNG.Location = new System.Drawing.Point(0, 385);
this.picSVGPNG.Margin = new System.Windows.Forms.Padding(0);
this.picSVGPNG.Name = "picSVGPNG";
this.picSVGPNG.Size = new System.Drawing.Size(511, 359);
this.picSVGPNG.TabIndex = 3;
this.picSVGPNG.TabStop = false;
//
// picPng
//
this.picPng.BackColor = System.Drawing.Color.White;
this.picPng.Dock = System.Windows.Forms.DockStyle.Fill;
this.picPng.Location = new System.Drawing.Point(0, 13);
this.picPng.Margin = new System.Windows.Forms.Padding(0);
this.picPng.Name = "picPng";
this.picPng.Size = new System.Drawing.Size(511, 359);
this.picPng.TabIndex = 2;
this.picPng.TabStop = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(83, 13);
this.label2.TabIndex = 0;
this.label2.Text = "Reference PNG";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(3, 372);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(69, 13);
this.label4.TabIndex = 4;
this.label4.Text = "SVG vs PNG";
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fIleToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1249, 24);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
// fIleToolStripMenuItem
//
this.fIleToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.runAllToolStripMenuItem});
this.fIleToolStripMenuItem.Name = "fIleToolStripMenuItem";
this.fIleToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fIleToolStripMenuItem.Text = "File";
//
// runAllToolStripMenuItem
//
this.runAllToolStripMenuItem.Name = "runAllToolStripMenuItem";
this.runAllToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.runAllToolStripMenuItem.Text = "Run All";
this.runAllToolStripMenuItem.Click += new System.EventHandler(this.RunAllToolStripMenuItemClick);
//
// View
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1249, 774+200);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "View";
this.Text = "Form1";
this.tableLayoutPanel1.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picSaveLoad)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picSvg)).EndInit();
this.tableLayoutPanel3.ResumeLayout(false);
this.tableLayoutPanel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picSVGPNG)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picPng)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
this.lstFiles = new System.Windows.Forms.ListBox();
this.boxConsoleLog = new System.Windows.Forms.RichTextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.picSaveLoad = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.picSvg = new System.Windows.Forms.PictureBox();
this.label3 = new System.Windows.Forms.Label();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.picSVGPNG = new System.Windows.Forms.PictureBox();
this.picPng = new System.Windows.Forms.PictureBox();
this.label2 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fIleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.runAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tableLayoutPanel1.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picSaveLoad)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picSvg)).BeginInit();
this.tableLayoutPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picSVGPNG)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picPng)).BeginInit();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// lstFiles
//
this.lstFiles.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstFiles.FormattingEnabled = true;
this.lstFiles.Location = new System.Drawing.Point(3, 3);
this.lstFiles.Name = "lstFiles";
this.lstFiles.Size = new System.Drawing.Size(174, 724);
this.lstFiles.TabIndex = 0;
this.lstFiles.SelectedIndexChanged += new System.EventHandler(this.lstFiles_SelectedIndexChanged);
//
// boxConsoleLog
//
this.boxConsoleLog.BackColor = System.Drawing.Color.White;
this.boxConsoleLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.boxConsoleLog.Location = new System.Drawing.Point(183, 733);
this.boxConsoleLog.Name = "boxConsoleLog";
this.boxConsoleLog.ReadOnly = true;
this.boxConsoleLog.Size = new System.Drawing.Size(1063, 14);
this.boxConsoleLog.TabIndex = 0;
this.boxConsoleLog.Text = "";
this.boxConsoleLog.MouseDown += new System.Windows.Forms.MouseEventHandler(this.boxConsoleLog_MouseDown);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 180F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.splitContainer1, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.lstFiles, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.boxConsoleLog, 1, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 24);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1249, 750);
this.tableLayoutPanel1.TabIndex = 1;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(183, 3);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.tableLayoutPanel3);
this.splitContainer1.Size = new System.Drawing.Size(1063, 724);
this.splitContainer1.SplitterDistance = 548;
this.splitContainer1.TabIndex = 0;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Controls.Add(this.picSaveLoad, 0, 3);
this.tableLayoutPanel2.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.picSvg, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.label3, 0, 2);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 4;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(548, 724);
this.tableLayoutPanel2.TabIndex = 0;
//
// picSaveLoad
//
this.picSaveLoad.BackColor = System.Drawing.Color.White;
this.picSaveLoad.Dock = System.Windows.Forms.DockStyle.Fill;
this.picSaveLoad.Location = new System.Drawing.Point(0, 375);
this.picSaveLoad.Margin = new System.Windows.Forms.Padding(0);
this.picSaveLoad.Name = "picSaveLoad";
this.picSaveLoad.Size = new System.Drawing.Size(548, 349);
this.picSaveLoad.TabIndex = 2;
this.picSaveLoad.TabStop = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(67, 13);
this.label1.TabIndex = 0;
this.label1.Text = "SVG Render";
//
// picSvg
//
this.picSvg.BackColor = System.Drawing.Color.White;
this.picSvg.Dock = System.Windows.Forms.DockStyle.Fill;
this.picSvg.Location = new System.Drawing.Point(0, 13);
this.picSvg.Margin = new System.Windows.Forms.Padding(0);
this.picSvg.Name = "picSvg";
this.picSvg.Size = new System.Drawing.Size(548, 349);
this.picSvg.TabIndex = 1;
this.picSvg.TabStop = false;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 362);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(80, 13);
this.label3.TabIndex = 3;
this.label3.Text = "Save and Load";
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.ColumnCount = 1;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Controls.Add(this.picSVGPNG, 0, 3);
this.tableLayoutPanel3.Controls.Add(this.picPng, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.label2, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.label4, 0, 2);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 4;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(511, 724);
this.tableLayoutPanel3.TabIndex = 0;
//
// picSVGPNG
//
this.picSVGPNG.BackColor = System.Drawing.Color.White;
this.picSVGPNG.Dock = System.Windows.Forms.DockStyle.Fill;
this.picSVGPNG.Location = new System.Drawing.Point(0, 375);
this.picSVGPNG.Margin = new System.Windows.Forms.Padding(0);
this.picSVGPNG.Name = "picSVGPNG";
this.picSVGPNG.Size = new System.Drawing.Size(511, 349);
this.picSVGPNG.TabIndex = 3;
this.picSVGPNG.TabStop = false;
//
// picPng
//
this.picPng.BackColor = System.Drawing.Color.White;
this.picPng.Dock = System.Windows.Forms.DockStyle.Fill;
this.picPng.Location = new System.Drawing.Point(0, 13);
this.picPng.Margin = new System.Windows.Forms.Padding(0);
this.picPng.Name = "picPng";
this.picPng.Size = new System.Drawing.Size(511, 349);
this.picPng.TabIndex = 2;
this.picPng.TabStop = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(83, 13);
this.label2.TabIndex = 0;
this.label2.Text = "Reference PNG";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(3, 362);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(69, 13);
this.label4.TabIndex = 4;
this.label4.Text = "SVG vs PNG";
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fIleToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1249, 24);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
// fIleToolStripMenuItem
//
this.fIleToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.runAllToolStripMenuItem});
this.fIleToolStripMenuItem.Name = "fIleToolStripMenuItem";
this.fIleToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fIleToolStripMenuItem.Text = "File";
//
// runAllToolStripMenuItem
//
this.runAllToolStripMenuItem.Name = "runAllToolStripMenuItem";
this.runAllToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
this.runAllToolStripMenuItem.Text = "Run All";
this.runAllToolStripMenuItem.Click += new System.EventHandler(this.RunAllToolStripMenuItemClick);
//
// View
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1249, 774);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "View";
this.Text = "Form1";
this.tableLayoutPanel1.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picSaveLoad)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picSvg)).EndInit();
this.tableLayoutPanel3.ResumeLayout(false);
this.tableLayoutPanel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picSVGPNG)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picPng)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
......
using System;
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;
using System.Drawing;
using System.IO;
using Svg;
using System.Diagnostics;
namespace SvgW3CTestRunner
{
public partial class View : Form
{
//DIRECTORY SEPARATOR: The value of this field is a slash ("/") on UNIX and on Mac OSX, and a backslash ("\") on the Windows operating systems.
static private string sprt = Path.DirectorySeparatorChar.ToString ();
//Data folders
private string _svgBasePath = @".."+sprt+".."+sprt+".."+sprt+"W3CTestSuite"+sprt+"svg"+sprt;
private string _pngBasePath = @".."+sprt+".."+sprt+".."+sprt+"W3CTestSuite"+sprt+"png"+sprt;
public View()
{
InitializeComponent();
// ignore tests pertaining to javascript or xml reading
var passes = File.ReadAllLines(_svgBasePath + @".."+sprt+"PassingTests.txt").ToDictionary((f) => f, (f) => true);
var files = (from f in
(from g in Directory.GetFiles(_svgBasePath)
select Path.GetFileName(g))
where !f.StartsWith("animate-") && !f.StartsWith("conform-viewer") &&
!f.Contains("-dom-") && !f.StartsWith("linking-") && !f.StartsWith("interact-") &&
!f.StartsWith("script-")
orderby f
select (object)f);
files = files.Where((f) => !passes.ContainsKey((string)f)).Union(Enumerable.Repeat((object)"## PASSING ##", 1)).Union(files.Where((f) => passes.ContainsKey((string)f)));
lstFiles.Items.AddRange(files.ToArray());
}
private void boxConsoleLog_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{ //click event
ContextMenu contextMenu = new System.Windows.Forms.ContextMenu();
MenuItem menuItem = new MenuItem("Copy");
menuItem.Click += new EventHandler(CopyAction);
contextMenu.MenuItems.Add(menuItem);
boxConsoleLog.ContextMenu = contextMenu;
}
}
void CopyAction(object sender, EventArgs e)
{
if (boxConsoleLog.SelectedText != null && boxConsoleLog.SelectedText != "")
{
//Clipboard.SetText(boxConsoleLog.SelectedText.Replace("\n", "\r\n"));
boxConsoleLog.Copy ();
}
}
private void lstFiles_SelectedIndexChanged(object sender, EventArgs e)
{
//render svg
var fileName = lstFiles.SelectedItem.ToString();
if (fileName.StartsWith("#")) return;
//display png
var png = Image.FromFile(_pngBasePath + Path.GetFileNameWithoutExtension(fileName) + ".png");
picPng.Image = png;
var doc = new SvgDocument();
try
{
Debug.Print(fileName);
doc = SvgDocument.Open(_svgBasePath + fileName);
if (fileName.StartsWith("__"))
{
picSvg.Image = doc.Draw();
}
else
{
var img = new Bitmap(480, 360);
doc.Draw(img);
picSvg.Image = img;
}
this.boxConsoleLog.AppendText ("\n\nWC3 TEST " + fileName + "\n");
}
catch (Exception ex)
{
this.boxConsoleLog.AppendText ("Result: TEST FAILED\n");
this.boxConsoleLog.AppendText ("SVG RENDERING ERROR for " + fileName + "\n");
this.boxConsoleLog.AppendText (ex.ToString());
//MessageBox.Show(ex.ToString(), "SVG Rendering");
picSvg.Image = null;
}
//save load
try
{
using(var memStream = new MemoryStream())
{
using System.Linq;
using System.Windows.Forms;
using System.Drawing;
using System.IO;
using Svg;
using System.Diagnostics;
namespace SvgW3CTestRunner
{
public partial class View : Form
{
//DIRECTORY SEPARATOR: The value of this field is a slash ("/") on UNIX and on Mac OSX, and a backslash ("\") on the Windows operating systems.
static private string sprt = Path.DirectorySeparatorChar.ToString ();
//Data folders
private string _svgBasePath = @".."+sprt+".."+sprt+".."+sprt+"W3CTestSuite"+sprt+"svg"+sprt;
private string _pngBasePath = @".."+sprt+".."+sprt+".."+sprt+"W3CTestSuite"+sprt+"png"+sprt;
public View()
{
InitializeComponent();
// ignore tests pertaining to javascript or xml reading
var passes = File.ReadAllLines(_svgBasePath + @".."+sprt+"PassingTests.txt").ToDictionary((f) => f, (f) => true);
var files = (from f in
(from g in Directory.GetFiles(_svgBasePath)
select Path.GetFileName(g))
where !f.StartsWith("animate-") && !f.StartsWith("conform-viewer") &&
!f.Contains("-dom-") && !f.StartsWith("linking-") && !f.StartsWith("interact-") &&
!f.StartsWith("script-")
orderby f
select (object)f);
files = files.Where((f) => !passes.ContainsKey((string)f)).Union(Enumerable.Repeat((object)"## PASSING ##", 1)).Union(files.Where((f) => passes.ContainsKey((string)f)));
lstFiles.Items.AddRange(files.ToArray());
}
private void boxConsoleLog_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{ //click event
ContextMenu contextMenu = new System.Windows.Forms.ContextMenu();
MenuItem menuItem = new MenuItem("Copy");
menuItem.Click += new EventHandler(CopyAction);
contextMenu.MenuItems.Add(menuItem);
boxConsoleLog.ContextMenu = contextMenu;
}
}
void CopyAction(object sender, EventArgs e)
{
if (boxConsoleLog.SelectedText != null && boxConsoleLog.SelectedText != "")
{
//Clipboard.SetText(boxConsoleLog.SelectedText.Replace("\n", "\r\n"));
boxConsoleLog.Copy ();
}
}
private void lstFiles_SelectedIndexChanged(object sender, EventArgs e)
{
//render svg
var fileName = lstFiles.SelectedItem.ToString();
if (fileName.StartsWith("#")) return;
//display png
var png = Image.FromFile(_pngBasePath + Path.GetFileNameWithoutExtension(fileName) + ".png");
picPng.Image = png;
var doc = new SvgDocument();
try
{
Debug.Print(fileName);
doc = SvgDocument.Open(_svgBasePath + fileName);
if (fileName.StartsWith("__"))
{
picSvg.Image = doc.Draw();
}
else
{
var img = new Bitmap(480, 360);
doc.Draw(img);
picSvg.Image = img;
}
this.boxConsoleLog.AppendText ("\n\nWC3 TEST " + fileName + "\n");
}
catch (Exception ex)
{
this.boxConsoleLog.AppendText ("Result: TEST FAILED\n");
this.boxConsoleLog.AppendText ("SVG RENDERING ERROR for " + fileName + "\n");
this.boxConsoleLog.AppendText (ex.ToString());
//MessageBox.Show(ex.ToString(), "SVG Rendering");
picSvg.Image = null;
}
//save load
try
{
using(var memStream = new MemoryStream())
{
doc.Write(memStream);
memStream.Position = 0;
var reader = new StreamReader(memStream);
var tempFilePath = Path.Combine(Path.GetTempPath(), "test.svg");
System.IO.File.WriteAllText(tempFilePath, reader.ReadToEnd());
memStream.Position = 0;
var baseUri = doc.BaseUri;
memStream.Position = 0;
var baseUri = doc.BaseUri;
doc = SvgDocument.Open(tempFilePath);
doc.BaseUri = baseUri;
if (fileName.StartsWith("__"))
{
picSaveLoad.Image = doc.Draw();
}
else
{
var img = new Bitmap(480, 360);
doc.Draw(img);
picSaveLoad.Image = img;
}
}
}
catch (Exception ex)
{
this.boxConsoleLog.AppendText ("Result: TEST FAILED\n");
this.boxConsoleLog.AppendText ("SVG SERIALIZATION ERROR for " + fileName + "\n");
this.boxConsoleLog.AppendText (ex.ToString());
//MessageBox.Show(ex.ToString(), "SVG Serialization");
picSaveLoad.Image = null;
}
//compare svg to png
try
{
picSVGPNG.Image = PixelDiff((Bitmap)picPng.Image, (Bitmap)picSvg.Image);
}
catch (Exception ex)
{
this.boxConsoleLog.AppendText ("Result: TEST FAILED\n");
this.boxConsoleLog.AppendText ("SVG TO PNG COMPARISON ERROR for " + fileName + "\n");
this.boxConsoleLog.AppendText (ex.ToString());
//MessageBox.Show(ex.ToString(), "SVG Comparison");
picSVGPNG.Image = null;
}
}
unsafe Bitmap PixelDiff(Bitmap a, Bitmap b)
{
Bitmap output = new Bitmap(a.Width, a.Height, PixelFormat.Format32bppArgb);
Rectangle rect = new Rectangle(Point.Empty, a.Size);
using (var aData = a.LockBitsDisposable(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb))
using (var bData = b.LockBitsDisposable(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb))
using (var outputData = output.LockBitsDisposable(rect, ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb))
{
byte* aPtr = (byte*)aData.Scan0;
byte* bPtr = (byte*)bData.Scan0;
byte* outputPtr = (byte*)outputData.Scan0;
int len = aData.Stride * aData.Height;
for (int i = 0; i < len; i++)
{
// For alpha use the average of both images (otherwise pixels with the same alpha won't be visible)
if ((i + 1) % 4 == 0)
*outputPtr = (byte)((*aPtr + *bPtr) / 2);
else
*outputPtr = (byte)~(*aPtr ^ *bPtr);
outputPtr++;
aPtr++;
bPtr++;
}
}
return output;
doc.BaseUri = baseUri;
if (fileName.StartsWith("__"))
{
picSaveLoad.Image = doc.Draw();
}
else
{
var img = new Bitmap(480, 360);
doc.Draw(img);
picSaveLoad.Image = img;
}
}
}
catch (Exception ex)
{
this.boxConsoleLog.AppendText ("Result: TEST FAILED\n");
this.boxConsoleLog.AppendText ("SVG SERIALIZATION ERROR for " + fileName + "\n");
this.boxConsoleLog.AppendText (ex.ToString());
//MessageBox.Show(ex.ToString(), "SVG Serialization");
picSaveLoad.Image = null;
}
//compare svg to png
try
{
picSVGPNG.Image = PixelDiff((Bitmap)picPng.Image, (Bitmap)picSvg.Image);
}
catch (Exception ex)
{
this.boxConsoleLog.AppendText ("Result: TEST FAILED\n");
this.boxConsoleLog.AppendText ("SVG TO PNG COMPARISON ERROR for " + fileName + "\n");
this.boxConsoleLog.AppendText (ex.ToString());
//MessageBox.Show(ex.ToString(), "SVG Comparison");
picSVGPNG.Image = null;
}
}
unsafe Bitmap PixelDiff(Bitmap a, Bitmap b)
{
Bitmap output = new Bitmap(a.Width, a.Height, PixelFormat.Format32bppArgb);
Rectangle rect = new Rectangle(Point.Empty, a.Size);
using (var aData = a.LockBitsDisposable(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb))
using (var bData = b.LockBitsDisposable(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb))
using (var outputData = output.LockBitsDisposable(rect, ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb))
{
byte* aPtr = (byte*)aData.Scan0;
byte* bPtr = (byte*)bData.Scan0;
byte* outputPtr = (byte*)outputData.Scan0;
int len = aData.Stride * aData.Height;
for (int i = 0; i < len; i++)
{
// For alpha use the average of both images (otherwise pixels with the same alpha won't be visible)
if ((i + 1) % 4 == 0)
*outputPtr = (byte)((*aPtr + *bPtr) / 2);
else
*outputPtr = (byte)~(*aPtr ^ *bPtr);
outputPtr++;
aPtr++;
bPtr++;
}
}
return output;
}
......@@ -198,63 +198,63 @@ namespace SvgW3CTestRunner
}
}
}
static class BitmapExtensions
{
public static DisposableImageData LockBitsDisposable(this Bitmap bitmap, Rectangle rect, ImageLockMode flags, PixelFormat format)
{
return new DisposableImageData(bitmap, rect, flags, format);
}
public class DisposableImageData : IDisposable
{
private readonly Bitmap _bitmap;
private readonly BitmapData _data;
internal DisposableImageData(Bitmap bitmap, Rectangle rect, ImageLockMode flags, PixelFormat format)
{
_bitmap = bitmap;
_data = bitmap.LockBits(rect, flags, format);
}
public void Dispose()
{
_bitmap.UnlockBits(_data);
}
public IntPtr Scan0
{
get { return _data.Scan0; }
}
public int Stride
{
get { return _data.Stride;}
}
public int Width
{
get { return _data.Width;}
}
public int Height
{
get { return _data.Height;}
}
public PixelFormat PixelFormat
{
get { return _data.PixelFormat;}
}
public int Reserved
{
get { return _data.Reserved;}
}
}
}
}
}
}
static class BitmapExtensions
{
public static DisposableImageData LockBitsDisposable(this Bitmap bitmap, Rectangle rect, ImageLockMode flags, PixelFormat format)
{
return new DisposableImageData(bitmap, rect, flags, format);
}
public class DisposableImageData : IDisposable
{
private readonly Bitmap _bitmap;
private readonly BitmapData _data;
internal DisposableImageData(Bitmap bitmap, Rectangle rect, ImageLockMode flags, PixelFormat format)
{
_bitmap = bitmap;
_data = bitmap.LockBits(rect, flags, format);
}
public void Dispose()
{
_bitmap.UnlockBits(_data);
}
public IntPtr Scan0
{
get { return _data.Scan0; }
}
public int Stride
{
get { return _data.Stride;}
}
public int Width
{
get { return _data.Width;}
}
public int Height
{
get { return _data.Height;}
}
public PixelFormat PixelFormat
{
get { return _data.PixelFormat;}
}
public int Reserved
{
get { return _data.Reserved;}
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment