System.Drawing.Drawing2D.LinearGradientBrush.SetSigmaBellShape C# (CSharp) Method

SetSigmaBellShape() public method

public SetSigmaBellShape ( float focus ) : void
focus float
return void
        public void SetSigmaBellShape(float focus)
        {
            SetSigmaBellShape (focus, 1.0F);
        }

Same methods

LinearGradientBrush::SetSigmaBellShape ( float focus, float scale ) : void

Usage Example

Esempio n. 1
0
 public void CreateGreyscale()
 {
     using (Bitmap b = new Bitmap(100, 100))
     {
         using (Graphics g = b.GetGraphics())
         {
             using (LinearGradientBrush brush = new LinearGradientBrush(
               new Rectangle(0, 0, 100, 100),
               Color.Blue,
               Color.Red,
               LinearGradientMode.Vertical))
             {
                 brush.SetSigmaBellShape(0.5f);
                 g.FillRectangle(brush, new Rectangle(0, 0, 100, 100));
                 using (Bitmap b2 = (Bitmap)b.CreateGreyscale())
                 {
                     if (ShowTestForm(b2) != DialogResult.OK)
                     {
                         Assert.Fail();
                     }
                 }
             }
         }
     }
 }
All Usage Examples Of System.Drawing.Drawing2D.LinearGradientBrush::SetSigmaBellShape