使用Gizmos的DrawLine方法画线. 首先在场景中找到五角星的五个定点的坐标,按照一笔画的顺序命名为1,2,3,4,5,如图所示: 接下来就是编写代码了,代码很少,如下所示: using UnityEngine; using System.Collections; public class fiveStars : MonoBehaviour { public Transform[] fivePoints = new Transform[5]; // Use this for initia
public void ABC() { var canvas = new Canvas(); Content = canvas; var points = new List<Point>() { new Point(200, 200), new Point(400, 200), new Point(200, 330), new Point(300, 100), new Point(400, 330), new Point(200, 200) }; var sb = new Storyboard
代码: function createSeal(id,company,name){ var canvas = document.getElementById(id); var context = canvas.getContext('2d'); // 绘制印章边框 var width=canvas.width/2; var height=canvas.height/2; context.lineWidth=7; context.strokeStyle="#f00"; context.b