Site hosted by Angelfire.com: Build your free website today!
Chapter 18: Working with Graphics

PreviousChapterContentsGlossaryNext

Creating and Editing Images with Microsoft Paint

Microsoft Paint is to images what WordPad is to text documents--a simple but versatile tool for creating and editing files. You can use it to make diagrams for presentations or to crop your online vacation photos; your five-year-old can use it as a coloring book, or your ten-year-old can use it to draw moustaches on the Mona Lisa.

For more advanced editing of image files, as well as for converting files to different graphics formats, we recommend Paint Shop Pro, a shareware program you can download from the Internet (from http://www.jasc.com). Other graphics editing and conversion programs are available from the Consummate Winsock Applications Web site at http://www.stroud.com.

note If Paint doesn't appear on the Start | All Programs | Accessories menu, you can install Paint from the Windows XP CD-ROM.

To run Paint for the first time (or for the first time in a while) choose Start | All Programs | Accessories | Paint. Depending on how your file system is set up, Paint may be the default application for .bmp files or other image files. If so, Paint runs whenever you open one of these files. Figure 18-5 shows the parts of a Paint window.

Callouts from previous edition, page 85, fig 05-01

Drawing area

Tool box

Color box

Foreground color

Background color

Status bar

Options box

Image=graphics.paint.tif

The toolbar buttons are labeled with shapes that suggest their use. For example, the button that draws lines has a line on it. When the cursor passes over a tool button, a short description of the tool appears on the status bar.

Opening and Saving Files

Paint works with only one document at a time. Opening a file or creating a new one automatically closes whatever file Paint had been working on previously. Paint opens files in most popular image formats, including bitmap (.bmp), TIFF (.tif), JPEG (.jpg), and GIF (.gif). Files created or edited by Paint can be saved as bitmap files in a variety of color schemes (monochrome, 16 color, 256 color, and 24-bit color), as well other image formats.

note By default, most image file types open in Windows Picture And Fax Viewer. Even if you have just created a file in Paint, opening its icon will open it in Windows Picture And Fax Viewer. To open an image file in Paint, right-click its icon and select Open With | Paint from the context menu.

By default the File | Save command saves new files in the My Pictures folder inside My Documents, and it saves other files to the location from which they were opened. To save elsewhere, choose File | Save As.

Selecting Objects

With the Select tool chosen (by clicking the dotted rectangle button in the Tool box), you can select objects inside the drawing area, just as you select objects inside an Explorer window: by enclosing them in a rectangle. Move the pointer to one corner of the rectangular area that includes the objects you want to select, hold the mouse button down, move to the opposite corner of the area, and release the mouse button.

The Free-Form Select tool (the dotted star button in the Tool box) enables you to select objects and parts of objects inside a region of any shape. Drag the cursor to trace out any shape. Either close up the shape, or Paint closes it up automatically with a straight line. The enclosed region is now selected, and can be moved by dragging or copied by cutting-and-pasting0xbeuseful for creating repeated patterns.

Magnifying and Enlarging

To magnify the objects in your drawing, or zoom in on a portion of the drawing area, click the Magnifier tool (the magnifying-glass button in the Tool box). A rectangle appears in the drawing area, which represents the portion of the drawing that will be visible after magnification. Position the rectangle to enclose the area you want to zoom in on, and then click. The portion of the drawing that was inside the rectangle now fills the entire viewing area. To zoom back out, click the Magnifier tool again, and then click anywhere in the viewing area.

When the Magnifier tool is selected, the Options box displays four magnification levels: 1x, 2x, 6x, and 8x. The current level of magnification is highlighted. To change to another level of magnification, click that option in the Options box.

To enlarge or shrink the drawing area (the "sheet of paper"), drag its corners.

Drawing Lines and Curves

Clicking with the Line tool (the straight line button in the Tool box) nails down one end of a line; the other end moves with the cursor. When the line is where you want it, click again to fix the other end. To make a curved line, click the Curve tool (the wiggly line button in the Tool box) and begin by drawing a straight line, as you would with the Line tool. Then, click-and-drag a point on that line to make a curve. You have the option of dragging a second point to make another kink in the curve.

When the Line or Curve tools are selected, different line thicknesses appear in the Options box, just below the Tool box. Select a new thickness by clicking the line thickness you want.

When you click with the left mouse button, the Line and Curve tools draw in the foreground color. To draw lines and curves in the background color, use the right mouse button.

Drawing Freehand

Paint has four tools in the Tool box that make freehand marks as you drag them: Pencil, Brush, Spray Can, and Eraser. Pencil makes thin lines, Brush makes thick lines, and Spray Can sprays a pattern of dots. You can choose among three densities of Spray Can dot patterns by clicking the pattern you want in the Options box. As its name suggests, the Eraser erases anything in its path, replacing it with the background color.

Making Shapes

These four tools in the Tool box make shapes: Ellipse, Rectangle, Rounded Rectangle, and Polygon. The simplest shape to make is a rectangle:

  1. Click the Rectangle tool (the solid0xbenot the dotted0xberectangle button).
  2. Click in the drawing area where you want one corner of the rectangle located.
  3. Drag to where you want the opposite corner of the rectangle located. When you release the mouse button, Paint creates the rectangle.

You use the Ellipse and Rounded Rectangle tools in a manner similar to the Rectangle tool.

The Polygon tool makes figures with any number of sides:

Coloring Objects

Control the colors of objects by using the Color box at the bottom of the Paint window. The two colored squares at the far left of the Color box show the current foreground and background colors, with the foreground square on top of the background square. Any object you construct using the left mouse button has the foreground color, whereas objects made using the right mouse button have the background color.

To choose a new foreground color, left-click the square of the new color in the Color box. To choose a new background color, right-click the square of the new color. You can match the color of any object in the drawing area by using the Pick Color tool (the eyedropper button in the Tool box). Select the tool, and then click the object whose color you want to match. Left-clicking changes the foreground color to match the object; right-clicking changes the background color to match the object.

To color within an outlined area, such as a rectangle or an ellipse, select the Fill With Color tool (the tipped paint can button), and click within the area. Right-click to fill with the background color. Using the Fill With Color tool on an area that is not outlined colors the whole "sheet of paper"0xbethe area outside of any enclosed region.

Changing the foreground or background color does not change the color of objects already created. To change an object to the new foreground (background) color, select the Fill With Color tool and click (right-click) the object whose color you want to change. You can invert the colors in a region (that is, make a negative of the original) by selecting the region choosing Image | Invert Colors.

Adding Text

Click the Text tool (the button with the A), and drag across the part of your picture where you want the type to appear. Paint displays a rectangular text box for you to type in. A font selection box appears above the text box so you can select the font, size, and style of the text. The color of the text is the foreground color. Click inside the text box and type. Click outside the text box when you are done typing.

The Options box below the Tool box gives two choices for using the Text tool. The top choice makes a solid background for the text box, using the background color. The bottom choice makes a transparent background.

Flipping, Rotating, and Stretching

Commands on the Image menu flip, rotate, or stretch the entire image or a selected part of the image. Choosing Image | Flip/Rotate opens a dialog box from which you can choose to flip the image horizontally or vertically, or you can rotate it by any multiple of 90 degrees. Choosing Image | Stretch/Skew opens another dialog box from which you can stretch the image horizontally or vertically by any percentage, or slant it by any number of degrees.

Elements that you add to a flipped, stretched, slanted, or rotated drawing are normal. This feature allows you to mix elements of various types in a single drawing, as in Figure 18-5.

Cropping Images

You can crop an image0xberemove unwanted material around the edges of a picture. To crop an image, use the Select tool to enclose the area of the image that you want to keep. To save the selected area as a new file, choose Edit | Copy To. Type a new filename and click Save. The original image is unaffected.

PreviousChapterContentsGlossaryNext