Tag Archives: graphics

Load a picture and manipulate pixels in WPF and C#

The post Easily manipulate pixels in WPF and C# explains a BitmapPixelMaker class that you can use to manipulate the pixels in an image in WPF relatively easily. That example creates the image from scratch. This post extends that class … Continue reading

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

Draw lines with gaps to show they are passing under other lines in C#

This example shows how to draw lines with gaps in them to show that they are passing under other lines. It seems like there must be a name for this, but I couldn’t find it so I’m calling them “cut … Continue reading

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

Animate maze solving, version 3

The previous maze-solving examples Animate maze solving, version 1 and Animate maze solving, version 2 used a recursive method named Solve that returns an IEnumerable containing the paths that the program was searching. Removing Recursion To remove the recursion, think … Continue reading

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

Animate maze solving, version 2

My earlier post Animate maze solving, version 1 uses a method that returns an enumeration to show the steps used to find a path through a maze. That method works but it uses a loop that includes calls to Thread.Sleep … Continue reading

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

Animate maze solving, version 1

The post Solve mazes in C# solves mazes very quickly, but it only shows you the final path from the start point to the end point. It might be nice to make a program to animate maze solving so you … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , | 2 Comments

Solve mazes in C#

This example shows how to solve mazes that were created by the example Make and draw a maze in C#. See that example for information about how to build a maze. Read the following sections to learn how to solve … Continue reading

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

Move and resize polygons in WPF and C#

The example Move and resize multiple shapes in WPF and C# shows how to resize some shapes in WPF, but it doesn’t let you resize polygons. You determine the position and size of most shapes by giving their left, top, … Continue reading

Posted in controls, graphics, wpf, XAML | Tagged , , , , , , , , , , , | 2 Comments

Move and resize multiple shapes in WPF and C#

The example Move and resize multiple rectangles in WPF and C# shows how to let the user move and resize multiple rectangles in a WPF program. This example extends that one to let you move and resize multiple shapes. See … Continue reading

Posted in controls, graphics, wpf, XAML | Tagged , , , , , , , , , , , | 7 Comments

Draw a horizontal compass in C#

This example shows how to draw the horizontal compass shown at the bottom of the picture on the right. On the surface this seems like a simple drawing exercise. It mostly is a drawing exercise, although it turned out to … Continue reading

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

Draw an image circle in C#

This example is somewhat similar to the post Draw an image spiral in C# except it draws an image circle instead of an image spiral. The key is the DrawImageCircle method, which draws a smaller image in a circle on … Continue reading

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