Exemple #1
0
        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);
                    }
                }
            }
        }
Exemple #2
0
 public void ClearColor(BrushMask bm)
 {
     foreach (var uvi in vertices)
     {
         bm.SetValuesOn(ref uvi.color, Color.black);
     }
 }
Exemple #3
0
 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);
         }
     }
 }