Tag Archives: transform

Use an animated cursor in C#

This example doesn’t show how to use an animated cursor file such as an animated gif or png file. As far as I know, C# doesn’t support that kind of cursor. What this example does do is show how to … Continue reading

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

Map drawing coordinates without distortion in C#

The post Easily map drawing coordinates in C# lets you easily map a rectangle in drawing coordinates to a rectangle in device coordinates. Often, however, you’ll want to ensure that the drawing area isn’t distorted. In other words, you don’t … Continue reading

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

Easily map drawing coordinates in C#

The example Map points between coordinate systems in C# shows several ways you can map drawing coordinates to screen coordinates. They all work but these sorts of coordinate conversions are really common if you’re doing more advanced graphics so I … Continue reading

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

Draw round circles in scaled coordinate systems in C#

In other posts I explain how you can use transformations to draw objects in a coordinate system other than the one provided “natively” by a PictureBox, Bitmap, and other objects that support drawing. Basically a transformation (represented by a Matrix … Continue reading

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

Rotate around a point other than the origin in C#

You can use a Matrix object to rotate, scale, translate, or skew a drawing. Its RotateAt method adds a rotation around a specific point to a Matrix. The following RotateAroundPoint method returns a new Matrix that represents rotation around a … Continue reading

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

Map points between coordinate systems in C#

This example shows how you can easily map points between different coordinate systems. The Graphics object provides transformations that let you scale, translate, rotate, skew, and otherwise transform graphics as you draw them. One important use of these transformations is … Continue reading

Posted in algorithms, drawing, graphics, transformations | Tagged , , , , , , , , , , , , , , , , , , | 3 Comments