Some of the most interesting and fun parts of a programming language are its graphics elements. In general, graphics fall into two major categories: vector and bitmap. Vector graphics are images generated by graphics methods such as DrawLine and … [Read more...] about Displaying and Sizing Images
Drawing and Painting
Drawing with GDI+ (Drawing and Painting)
You have seen the basics of displaying images on your forms; now let's move on to some real graphics operations, namely how to create your own graphics with the Framework. Windows graphics are based on a graphics engine, known as GDI. GDI, which … [Read more...] about Drawing with GDI+ (Drawing and Painting)
The Basic Drawing Objects (GDI+)
This is a good point to introduce some of the objects we'll be using all the time when drawing. No matter what you draw or which drawing instrument you use, one or more of the objects discussed in this section will be required. The Graphics … [Read more...] about The Basic Drawing Objects (GDI+)
Drawing Shapes with GDI+
Now that we've covered the auxiliary drawing objects, we can look at the drawing methods of the Graphics class. Before getting into the details of the drawing methods, however, let's write a simple application that draws a couple of simple shapes on … [Read more...] about Drawing Shapes with GDI+
Drawing Methods (with GDI+) in Visual Basic 2008
The Framework provides several drawing methods, one for each basic shape. You can create much more elaborate shapes by combining the methods described in the following sections. All drawing methods have a few things in common. The first argument … [Read more...] about Drawing Methods (with GDI+) in Visual Basic 2008
Gradients (Linear Gradients, Path Gradients)
In this section, you'll look at the tools for creating gradients. The techniques for gradients can get quite complicated, but I will limit the discussion to the types of gradients you'll need for business or simple graphics applications. Linear … [Read more...] about Gradients (Linear Gradients, Path Gradients)
Clipping (drawing with GDI+)
Anyone who has used drawing or image-processing applications already knows that many of the application's tools use masks. A mask is any shape that limits the area in which you can draw. If you want to place a star or heart on an image and print … [Read more...] about Clipping (drawing with GDI+)
Applying Transformations (scaling, translation, and rotation)
In computer graphics, there are three types of transformations: scaling, translation, and rotation: The scaling transformation changes the dimensions of a shape but not its basic form. If you scale an ellipse by 0.5, you'll get another ellipse … [Read more...] about Applying Transformations (scaling, translation, and rotation)