コード例 #1
0
 public KicadLibText()
 {
     Position = new KicadLibPoint(0, 0);
     Italic   = new KicadLibItalic(false);
     HAlign   = new KicadLibHTextJustify(0);
     VAlign   = new KicadLibVTextJustify(0);
 }
コード例 #2
0
        public void Parse(String[] items)
        {
            if (items[0] != "P")
            {
                throw new Exception("LibPolygon public class parse error. Another object.");
            }

            try
            {
                Count = System.Convert.ToInt32(items[1]);
                Part  = System.Convert.ToInt32(items[2]);
                Dmg   = System.Convert.ToInt32(items[3]);
                Pen   = System.Convert.ToInt32(items[4]);

                Points = new KicadLibPoint[Count];
                for (int i = 0; i < Count; i++)
                {
                    Points[i] = new KicadLibPoint(System.Convert.ToInt32(items[5 + 2 * i + 0]),
                                                  System.Convert.ToInt32(items[5 + 2 * i + 1]));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            Fill.Parse(items[5 + 2 * Count]);
        }
コード例 #3
0
 public KicadLibArc()
 {
     Position = new KicadLibPoint(0, 0);
     Fill     = new KicadLibFill(0);
     Start    = new KicadLibPoint(0, 0);
     End      = new KicadLibPoint(0, 0);
 }
コード例 #4
0
 public KicadLibPin()
 {
     Position    = new KicadLibPoint(0, 0);
     Orientation = new KicadLibPinOrientation(0);
     Type        = new KicadLibPinType(0);
     Shape       = new KicadLibPinShape(0);
 }
コード例 #5
0
 public KicadLibFX(int type = 0)
 {
     Position    = new KicadLibPoint(0, 0);
     Oreintation = new KicadLibTextOrientation(KicadLibTextOrientation.TextOrient.Horizontal);
     Visible     = new KicadLibVisible(true);
     HJustify    = new KicadLibHTextJustify(0);
     VJustify    = new KicadLibVTextJustify(0);
     FType       = type;
     TextSize    = 50;
 }
コード例 #6
0
        public void Parse(String line)
        {
            char[]   charSeparators = new char[] { ' ' };
            String[] items          = line.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries);

            if (items[0] != "P")
            {
                throw new Exception("LibPolygon public class parse error. Another object.");
            }

            Count = System.Convert.ToInt32(items[1]);
            Part  = System.Convert.ToInt32(items[2]);
            Dmg   = System.Convert.ToInt32(items[3]);
            Pen   = System.Convert.ToInt32(items[4]);

            Points = new KicadLibPoint[Count];
            for (int i = 0; i < Count; i++)
            {
                Points[i] = new KicadLibPoint(System.Convert.ToInt32(items[5 + 2 * i + 0]),
                                              System.Convert.ToInt32(items[5 + 2 * i + 1]));
            }

            Fill.Parse(items[5 + 2 * Count]);
        }
コード例 #7
0
 public KicadLibCircle()
 {
     Position = new KicadLibPoint(0, 0);
     Fill     = new KicadLibFill(0);
 }