Example #1
0
        public static void ProcessMask_Invert(SWTexture2DEx tex)
        {
            SWUndo.RegisterCompleteObjectUndo(tex);
            SWTexThread_Invert t = new SWTexThread_Invert(tex, null);

            t.Process(null);
        }
Example #2
0
 public static void ProcessTexture_Clean(SWTexture2DEx tex)
 {
     SWUndo.RegisterCompleteObjectUndo(tex);
     Color[] colors = new Color[tex.width * tex.height];
     tex.SetPixels(colors);
     tex.Apply();
 }
Example #3
0
        public static void ProcessMask_Dropper(SWTexture2DEx tex, SWTexture2DEx texSource, Vector2 _uv, SWBrush _brush, float tolerance)
        {
            SWUndo.RegisterCompleteObjectUndo(tex);
            SWTexThread_ColorRange t = new SWTexThread_ColorRange(tex, texSource, _brush);

            t.Process(_uv, tolerance);
        }
Example #4
0
        public static void ProcessMask_DrawLine(SWTexture2DEx tex, Vector2 _startUV, Vector2 _endUV, SWBrush brush)
        {
            SWUndo.RegisterCompleteObjectUndo(tex);
            SWTexThread_TexDrawLine t = new SWTexThread_TexDrawLine(tex, brush);

            t.Process(_startUV, _endUV);
        }
Example #5
0
        public static void ProcessMask_Wand(SWTexture2DEx tex, SWTexture2DEx texSource, Vector2 _uv, SWBrush _brush, float tolerance)
        {
            SWUndo.RegisterCompleteObjectUndo(tex);
            texSource.filterMode = FilterMode.Point;
            SWTexThread_Wand t = new SWTexThread_Wand(tex, texSource, _brush);

            t.Process(_uv, tolerance);
        }
Example #6
0
        public static void ProcessMask_DrawPoint(SWTexture2DEx tex, Vector2 _uv, SWBrush _brush)
        {
            colorStartBuffer = tex.GetPixels();
            brushBuffer      = new float[tex.width, tex.height];

            SWUndo.RegisterCompleteObjectUndo(tex);
            SWTexThread_TexDrawPoint t = new SWTexThread_TexDrawPoint(tex, _brush);

            t.Process(_uv);
        }
Example #7
0
 public static void ProcessRemap_Line(SWTexture2DEx tex, RemapLineInfo info, float size)
 {
     SWUndo.RegisterCompleteObjectUndo(tex);
     if (info.stitch)
     {
         ProcessRemap_LineStitch(tex, info, size);
     }
     else
     {
         ProcessRemap_LineNormal(tex, info, size);
     }
 }
Example #8
0
 public static void ProcessRemap_Line(SWTexture2DEx tex, RemapLineInfo info, float size)
 {
     SWUndo.RegisterCompleteObjectUndo(tex);
     //if (info.stitch)
     if (SWWindowDrawRemap.Instance.rData.l.st)
     {
         ProcessRemap_LineStitch(tex, info, size);
     }
     else
     {
         ProcessRemap_LineNormal(tex, info, size);
     }
 }
Example #9
0
        public static void ProcessRemap_Dir(SWTexture2DEx tex, SWTexture2DEx texSource, Vector2 offset, bool precise, int _pixelBack)
        {
            SWUndo.RegisterCompleteObjectUndo(tex);
            SWTexThread_RemapDir d = new SWTexThread_RemapDir(tex, texSource, null);

            if (precise)
            {
                d.Process(offset, 0.01f, _pixelBack);
            }
            else
            {
                d.Process(offset, 0.1f, _pixelBack);
            }
        }