Tag Archives: PathGradientBrush

Make a rotating brush in C#

This example draws a background filled with a rotating brush. It then draws text over the background. When it starts the program uses the following code to create points that define a regular polygon. // The polygon’s points. private PointF[] … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , | Leave a comment

Make a selection dialog that uses a color wheel in C#

The example Draw a color wheel with alpha and saturation values in C# lets the user select a color on a color wheel. This example uses that technique to build a color selection dialog. This change is fairly easy. First … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

Draw a color wheel with alpha and saturation values in C#

The example Draw a colorful color wheel in C# shows how to draw a color wheel. This example lets you use scroll bars to change the alpha (opaqueness) and saturation (grayness) values of the colors. This is actually a pretty … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , , , , , , , | 1 Comment

Let the user move the center point of an elliptical gradient in C#

The example Fill an area with an elliptical gradient in C# shows how to make a brush that fills an area with an elliptical gradient. This example just lets the user move the gradient’s center point. When you move the … Continue reading

Posted in graphics | Tagged , , , , , , , , , , , , , | Leave a comment

Fill an area with an elliptical gradient in C#

Filling an area with an elliptical gradient is non-trivial in a Windows Forms application because the .NET Framework libraries intended for use with Windows Forms don’t include a RadialGradientBrush class. There is such a class in the System.Windows.Media namespace, but … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , , | 1 Comment

Fill a polygon with a PathGradientBrush in C#

A PathGradientBrush defines a brush that shades smoothly from a “center point” to specific points along a path. This example fills a hexagon with colors that shade from white in the center to red, yellow, lime, cyan, blue, and magenta … Continue reading

Posted in graphics | Tagged , , , , , , , , , , , , , | 2 Comments