Exemplo n.º 1
0
 public override Image Apply(Image img)
 {
     using (img)
     {
         return(ColorMatrixManager.Contrast(Value).Apply(img));
     }
 }
Exemplo n.º 2
0
 public override Bitmap Apply(Bitmap bmp)
 {
     using (bmp)
     {
         return(ColorMatrixManager.Contrast(Value).Apply(bmp));
     }
 }
Exemplo n.º 3
0
        /// <summary>Must be called before show form</summary>
        public virtual void Prepare()
        {
            if (SurfaceImage == null)
            {
                SurfaceImage = Screenshot.CaptureFullscreen();
            }

            if (Config.UseDimming)
            {
                using (Image darkSurfaceImage = ColorMatrixManager.Contrast(0.9f).Apply(SurfaceImage))
                {
                    darkBackgroundBrush = new TextureBrush(darkSurfaceImage)
                    {
                        WrapMode = WrapMode.Clamp
                    };
                }

                using (Image lightSurfaceImage = ColorMatrixManager.Contrast(1.1f).Apply(SurfaceImage))
                {
                    lightBackgroundBrush = new TextureBrush(lightSurfaceImage)
                    {
                        WrapMode = WrapMode.Clamp
                    };
                }
            }
            else
            {
                darkBackgroundBrush = new TextureBrush(SurfaceImage);
            }
        }
Exemplo n.º 4
0
        /// <summary>Must be called before show form</summary>
        public virtual void Prepare()
        {
            if (SurfaceImage == null)
            {
                SurfaceImage = Screenshot.CaptureFullscreen();
            }

            using (Image darkSurfaceImage = ColorMatrixManager.Contrast(0.8f).Apply(SurfaceImage))
            {
                darkBackgroundBrush = new TextureBrush(darkSurfaceImage);
            }

            using (Image lightSurfaceImage = ColorMatrixManager.Contrast(1.1f).Apply(SurfaceImage))
            {
                lightBackgroundBrush = new TextureBrush(lightSurfaceImage);
            }
        }