Skip to content

Commit c89a9cc

Browse files
feat: <path> readable
1 parent 9a5e556 commit c89a9cc

7 files changed

Lines changed: 526 additions & 64 deletions

File tree

FreeFrame/Components/Importer.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ static public List<Shape> ImportFromStream(Stream pStream)
2727
{
2828
if (reader.HasAttributes)
2929
{
30-
Console.WriteLine("Attributes of <" + reader.Name + ">");
30+
//Console.WriteLine("Attributes of <" + reader.Name + ">");
3131
switch (reader.Name)
3232
{
3333
case "xml":
3434
case "svg":
35-
case "rect":
35+
break; // Skip knowned elements
3636
case "path":
37+
shapes.Add(new SVGPath(reader));
38+
break;
39+
case "rect":
40+
shapes.Add(new SVGRectangle(reader));
3741
break;
3842
case "circle":
3943
shapes.Add(new SVGCircle(reader));
@@ -50,7 +54,7 @@ static public List<Shape> ImportFromStream(Stream pStream)
5054
static public List<Shape> ImportFromFile(string pFilename)
5155
{
5256
if (!File.Exists(pFilename))
53-
throw new ArgumentException($"'{nameof(pFilename)}' file cannot be found.", nameof(pFilename)); //TODO: replace by a simple alert window
57+
throw new ArgumentException($"'{pFilename}' file cannot be found.", nameof(pFilename)); //TODO: replace by a simple alert window
5458

5559
byte[] byteArray = Encoding.UTF8.GetBytes(File.ReadAllText(pFilename));
5660

0 commit comments

Comments
 (0)