1.9. Conclusion

C# provides a huge number of graphics tools that you can use to solve all sorts of problems. By using Graphics objects, pens, and brushes, you can draw and fill all sorts of shapes. You can use stock pens and brushes or create your own with hatch patterns, gradient fills, textures, custom dash patterns and end caps, and longitudinal stripes.

The Graphics class's DrawString method lets you draw text formatted and wrapped to fit a particular area, optionally with ellipses. The Bitmap class provides methods for getting and setting the values of every pixel in an image.

Transformations add a whole new level of power to any graphics code. By using transformations, you can stretch, rotate, and translate images to reuse code that draws ...

Get C# Graphics Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.