public static void AddCurve3To(this VertexStore vxs, double x1, double y1, double x2, double y2) { vxs.AddVertex(x1, y1, VertexCmd.P2c); vxs.AddVertex(x2, y2, VertexCmd.LineTo); }
public static void AddCurve4To(this VertexStore vxs, double x1, double y1, double x2, double y2, double x3, double y3) { vxs.AddVertex(x1, y1, VertexCmd.P3c); vxs.AddVertex(x2, y2, VertexCmd.P3c); vxs.AddVertex(x3, y3, VertexCmd.LineTo); }
public VertexStore MakeVxs(VertexStore vxs) { foreach (VertexData v in this.GetVertexIter()) { vxs.AddVertex(v.x, v.y, v.command); } return(vxs); }
/// <summary> /// copy + translate vertext data from src to outputVxs /// </summary> /// <param name="src"></param> /// <param name="dx"></param> /// <param name="dy"></param> /// <param name="outputVxs"></param> /// <returns></returns> public static VertexStore TranslateToNewVxs(this VertexStore src, double dx, double dy, VertexStore outputVxs) { int count = src.Count; VertexCmd cmd; for (int i = 0; i < count; ++i) { cmd = src.GetVertex(i, out double x, out double y); x += dx; y += dy; outputVxs.AddVertex(x, y, cmd); } return(outputVxs); }
public static void AddNoMore(this VertexStore vxs) { vxs.AddVertex(0, 0, VertexCmd.NoMore); }
public static void AddCloseFigure(this VertexStore vxs, double x, double y) { vxs.AddVertex(x, y, VertexCmd.Close); }
public static void AddCloseFigure(this VertexStore vxs) { vxs.AddVertex(0, 0, VertexCmd.Close); }
public static void AddLineTo(this VertexStore vxs, double x1, double y1) { vxs.AddVertex(x1, y1, VertexCmd.LineTo); }
public static void AddMoveTo(this VertexStore vxs, double x0, double y0) { vxs.AddVertex(x0, y0, VertexCmd.MoveTo); }
/// <summary> /// add 3rd curve point (for C4 curve) /// </summary> /// <param name="x"></param> /// <param name="y"></param> public static void AddP3c(this VertexStore vxs, double x, double y) { vxs.AddVertex(x, y, VertexCmd.P3c); }