public void SetEdges(Color col, BrushMask mask) { if (!Pixels.IsNullOrEmpty()) { for (int XSection = 0; XSection <= 1; XSection++) { int x = XSection * width - 1; for (int y = 0; y < height; y++) { var pix = PixelUnSafe(x, y); mask.SetValuesOn(ref pix, col); SetPixelUnSafe(x, y, pix); } } for (int YSection = 0; YSection <= 1; YSection++) { int y = YSection * height - 1; for (int x = 0; x < height; x++) { var pix = PixelUnSafe(x, y); mask.SetValuesOn(ref pix, col); SetPixelUnSafe(x, y, pix); } } } }
public void ClearColor(BrushMask bm) { foreach (var uvi in vertices) { bm.SetValuesOn(ref uvi.color, Color.black); } }
public void SetColorOnLine(Color col, BrushMask bm, MeshPoint other) { foreach (var u in vertices) { if (u.ConnectedTo(other)) { bm.SetValuesOn(ref u.color, col); //val *= u._color.GetChanel01(chan) * u.GetConnectedUVinVertex(other)._color.GetChanel01(chan); } } }