System.Drawing.Graphics.GetNearestColor C# (CSharp) Method

GetNearestColor() public method

public GetNearestColor ( Color color ) : Color
color Color
return Color
        public Color GetNearestColor(Color color)
        {
            // this uses a color pallette which we really do not implement
            // so just return back the color passed for now.
            return Color.FromArgb (color.ToArgb());
        }

Usage Example

Example #1
0
 public void DrawFunction(DrawableFunction drawableFunction)
 {
     drawer.Clear(drawer.GetNearestColor(defaultColor));
     foreach (var drawableRactangle in drawableFunction.GetDrawableRactangles())
     {
         DrawRactangle(drawableRactangle, drawableFunction.GetheightColorGetter().GetColorByHeight(drawableRactangle.AverageZ));
     }
 }
All Usage Examples Of System.Drawing.Graphics::GetNearestColor