Пример #1
0
        protected void ApplyWand_Dropper()
        {
            if (SWCommon.GetMouseDown(0, false) && al_rectMain.Contains(mousePosOut + new Vector2(0, al_startY)))
            {
                CalUV();
                var firstNode = LayerMask_WandDropperNode(node);
                if (firstNode.texture == null)
                {
                    return;
                }

                //	SWTexture2DEx _tex = SWTextureProcess.TextureResize (firstNode.texture, texWidth, texHeight);
                SWTexture2DEx _tex = SWTextureProcess.TextureResizeTRS(firstNode.texture, texWidth, texHeight, firstNode.data.effectData);

                if (brush.mode == SWBrushMode.wand)
                {
                    SWTextureProcess.ProcessMask_Wand(node.texMask, _tex, uv, brush, tolerance);
                }
                else if (brush.mode == SWBrushMode.dropper)
                {
                    SWTextureProcess.ProcessMask_Dropper(node.texMask, _tex, uv, brush, tolerance);
                }
                lastUV          = uv;
                node.data.dirty = true;
                hasFirstPoint   = false;
            }
        }