public PathLayer(Polycurve pImage, string pName, bool pActive = true)
        {
            _Changed       = new VariableMonitor <bool>();
            _RenderChanged = new VariableMonitor <bool>();

            //Open the defined image
            mActive = pActive;
            mImage  = pImage;
            mName   = pName;

            //
            var transparency = Color.FromRgba(0, 0, 0, 0).ToSKColor();

            mDrawPaint             = new SKPaint();
            mDrawPaint.BlendMode   = SKBlendMode.Src;
            mDrawPaint.Color       = Globals.TextColor.ToSKColor();
            mDrawPaint.ColorFilter = SKColorFilter.CreateBlendMode(transparency, SKBlendMode.Dst);

            mUndrawPaint             = new SKPaint();
            mUndrawPaint.BlendMode   = SKBlendMode.Src;
            mUndrawPaint.Color       = Globals.BackgroundColor.ToSKColor();
            mUndrawPaint.ColorFilter = SKColorFilter.CreateBlendMode(transparency, SKBlendMode.Dst);

            Off();
        }
Example #2
0
        bool ProcessImage(string filename, Polycurve Image)
        {
            CacheFunction?.Invoke((new PathLayer(Image, filename) as ILayer));

            if (filename.Contains("seg"))
            {
                segments.AddLayer(Image, filename);
            }
            else if (filename.Contains("sub"))
            {
                subsegments.AddLayer(Image, filename);
            }
            else if (filename.Contains("bar"))
            {
                mBargraph.AddLayer(Image, filename);
            }
            else
            {
                mOther.AddLayer(Image, filename);
            }

            return(true);
        }
Example #3
0
        public void                      AddLayer(Polycurve pImage, string pName, bool pActive = true)
        {
            var temp = new PathLayer(pImage, pName, pActive);

            AddLayer(temp);
        }