Пример #1
0
        protected override void ThreadMission_Pixel(int i, int j)
        {
            base.ThreadMission_Pixel(i, j);
            Vector2 _uv   = SWTextureProcess.TexUV(texWidth, texHeight, i, j);
            float   dis   = SWTextureProcess.Point2SegDis(_uv, startUV, endUV);
            float   isize = (float)brush.size / (float)SWWindowDrawMask.size;

            if (dis < isize)
            {
                float disPcg = dis / isize;
                SWTextureProcess.Brush_Apply(ref texColorBuffer [(texHeight - j - 1) * texWidth + i], brush, disPcg, i, j);
            }
        }
        protected override void ThreadMission_Pixel(int i, int j)
        {
            base.ThreadMission_Pixel(i, j);
            if (brush.size == 1)
            {
                if (i == centerX && j == centerY)
                {
                    SWTextureProcess.Brush_Apply(ref texColorBuffer [(texHeight - j - 1) * texWidth + i], brush, 0, i, j);
                }
                return;
            }

            Vector2 _uv   = SWTextureProcess.TexUV(texWidth, texHeight, i, j);
            float   dis   = Vector2.Distance(uv, _uv);
            float   isize = (float)brush.size / (float)SWWindowDrawMask.size;

            if (dis < isize)
            {
                float disPcg = dis / isize;
                SWTextureProcess.Brush_Apply(ref texColorBuffer [(texHeight - j - 1) * texWidth + i], brush, disPcg, i, j);
            }
        }