protected override void ThreadMission_Pixel(int i, int j) { base.ThreadMission_Pixel(i, j); var cc = texSrcColorBuffer[(texSrcHeight - j - 1) * texSrcWidth + i]; float m = SWTextureProcess.Match(cc, colors); if (m <= tolerance) { //Vector2 _uv = TexUV (t_Width, t_Height, i, j); int index = SWTextureProcess.XYtoIndex(texSrcWidth, texSrcHeight, i, j); SWTextureProcess.Brush_ApplyOnce(ref texColorBuffer[index], brush, 0); } }
void PerPixel(PixelCom p) { map [p.x, p.y] = 2; int index = SWTextureProcess.XYtoIndex(texSrcWidth, texSrcHeight, p.x, p.y); float m = SWTextureProcess.Match(texSrcColorBuffer [index], texSrcColorBuffer [p.colorFrom]); if (m <= tolerance) { SWTextureProcess.Brush_ApplyOnce(ref texColorBuffer [index], brush, 0); AddTask(p.x + 1, p.y, index); AddTask(p.x - 1, p.y, index); AddTask(p.x, p.y - 1, index); AddTask(p.x, p.y + 1, index); } }