public void display(PenDrawingPath penPath) { lr.positionCount = penPath.Count; //lr.widthMultiplier = widthMult; //lr.widthCurve = widthCurve; for (int i = 0; i < penPath.Count; ++i) { PenMove move = penPath[i]; if (move.hasColor) { color = move.color; } if (move.text != null) { textAt(move.destination, move.text); } lr.SetPosition(i, move.destination); } }
private void DrawPath(PenDrawingPath path) { List <PenMove> moves = path.GetMoves().ToList(); if (moves.Count == 0) { return; } PenMove last = moves[0]; PenMove next; for (int i = 1; i < moves.Count; ++i) { next = moves[i]; if (!next.up || dbugSettings.drawTravelMoves) { DrawLine(last.destination, next.destination); } last = next; } }
public void addMoves(PenUpdate pu) { List <PenMove> moves = pu.drawPath.GetMoves().ToList(); if (moves.Count == 0) { return; } if (moves.Count == 1) { Debug.LogWarning("why?"); return; } PenMove first = moves[0]; if (!machineConfig.isSameXY(cursor, first.destination)) { if (!isCursorUp) { lines.Add(penUp()); } lines.Add(move(first.destination, 1)); } if (isCursorUp) { lines.Add(penDown()); } PenMove next = moves[1]; lines.Add(move(next.destination, -1)); for (int i = 2; i < moves.Count; ++i) { next = moves[i]; lines.Add(move(next.destination, 0)); } }