Tag Archives: anti aliasing

Use transparency when drawing with anti-aliasing in C#

Anti-aliasing makes drawn lines look smoother on a raster image such as a bitmap or on the screen. Transparency allows you to place an image on top of another image so parts of the underlying image show through. Unfortunately, when … Continue reading

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

Fix rectangle SmoothingMode problems in C#

This example explains how to fix a rather obscure SmoothingMode problem. If you look closely at the PictureBox on the right in the picture, you’ll see that its top and leftmost pixels are not the same color as the rest … Continue reading

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

Fill a shape with random lines in C#

Click and drag to draw a shape. When you release the mouse, the program closes the shape and fills it with random line segments. The following code shows how the program lets you draw a shape. // The points selected … Continue reading

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

Understand font aliasing issues in C#

Aliasing is a process that graphics routines use to provide smoother results. Font aliasing is that process applied to fonts. When you use a Graphics object’s DrawString method to draw text, you can set the its TextRenderingHint property to tell … Continue reading

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