Example #1
0
        private Bitmap ScVxButton_PostTreatmentEffectGDI(object sender, Bitmap backBitmap)
        {
            //if (effectBitmap != null)
            //{
            //    effectBitmap.Dispose();
            //    effectBitmap = null;

            //}

            if (effectBitmap == null)
            {
                Bitmap lightBitmap = (Bitmap)backBitmap.Clone();
                ColorDisplace.Displace(lightBitmap, selectHaloColor);

                GaussianBlur gs = new GaussianBlur(10);
                effectBitmap = gs.ProcessImage(lightBitmap);
                lightBitmap.Dispose();
            }

            Bitmap   bmp = (Bitmap)effectBitmap.Clone();
            Graphics g   = Graphics.FromImage(bmp);

            g.DrawImage(backBitmap, 0, 0);
            g.Dispose();
            return(bmp);
        }
Example #2
0
 public void ClearBitmapRect(RectangleF clipRect)
 {
     if (bitmap != null && controlType == ControlType.UPDATELAYERFORM)
     {
         Rectangle rc = new Rectangle((int)clipRect.Left, (int)clipRect.Top, (int)clipRect.Width, (int)clipRect.Height);
         ColorDisplace.Displace(bitmap, Color.FromArgb(0, 0, 0, 0), rc, true);
     }
 }
Example #3
0
        private void ScVxButton_GDIPaint(GDIGraphics g)
        {
            Graphics graphis = g.GdiGraph;

            graphis.SmoothingMode = SmoothingMode.HighQuality;

            if (haloBitmap != null && isSelected)
            {
                ColorDisplace.DisplaceAlpha(haloBitmap, animHaloAlphaScale, haloAlphaMask);
                graphis.DrawImage(haloBitmap, 0, 0);
            }
            else if (shadowBitmap != null)
            {
                graphis.DrawImage(shadowBitmap, 0, 0);
            }
        }