📄 ch11.htm
字号:
rectangular region. Choose the Marquee tool and then drag a bounding rectangle onthe image. When you stop dragging, a marquee is drawn around the region to mark it.The Lasso tool works in much the same way but enables you to define a freehand region.A Lasso region is filled with a hatch pattern to identify it.</P><BLOCKQUOTE> <P><HR><strong>TIP:</strong> When using the Lasso tool, you don't have to close the region. When you release the mouse button, the Image Editor automatically closes the region by drawing a connection line between the start point and the end point.<HR></BLOCKQUOTE><P>When a region is defined, you can cut or copy the image within the region andpaste it somewhere else on the image or to another image you are working on (youcan have multiple bitmaps open at one time). When you choose Edit|Paste from themain menu, the image within the marquee is placed in the upper-left corner of thebitmap with a marquee around it. The pasted image can now be dragged into position.</P><P>When you place your mouse cursor within the marquee, the cursor changes to a hand.When you see the hand cursor, you can drag the bitmap within the marquee to anotherlocation and drop it. You can continue to move the bitmap until you have it positionedexactly where you want it. After you have the bitmap where you want it, click againon the image outside the marquee and the bitmap within the marquee merge into theexisting image.</P><BLOCKQUOTE> <P><HR><strong>TIP:</strong> The Image Editor has a shortcut method of cut and paste. Create a Marquee or Lasso region, place your mouse cursor inside the region, and drag. The image within the region moves as you drag.<HR></BLOCKQUOTE><P>When you cut a region or move it by dragging, the current background color willfill the area that the image originally occupied. The background shows through thehole created by the cut operation<B>.</B></P><BLOCKQUOTE> <P><HR><strong>TIP:</strong> You can copy portions of one bitmap to another using cut and paste. First, open both images in the Image Editor. Place a marquee around the portion of the original image you want to copy and then choose Edit|Copy from the main menu. Switch to the other image and choose Edit|Paste from the main menu. Move the pasted image as needed. <HR> <P><HR><strong>NOTE:</strong> If you have a marquee selected when you paste, the pasted image will shrink or stretch to fit the size of the marquee. <HR></BLOCKQUOTE><P>The Eraser tool works just the opposite of the other tools in regard to the leftand right mouse buttons. With the Eraser, the left mouse button draws with the backgroundcolor and the right mouse button draws with the foreground color.</P><P>The Text tool enables you to place text on the image. The text is drawn usingthe current text settings. The text settings can be changed by clicking the Textitem on the main menu. Here you can set the text alignment (left, right, or centered)or the font (typeface). To change the typeface, choose Text|Font from the main menu.Now you can choose a new typeface or make the font bold, italic, underlined, andso on.</P><P>The other drawing tools are self-explanatory. As I said earlier, a little timebehind the wheel of the Image Editor will teach you just about everything you needto know about those tools.</P><BLOCKQUOTE> <P><HR><strong>TIP:</strong> When drawing rectangles, you can press and hold the Shift key to force a rectangle to a square. Likewise, you can draw a perfect circle by choosing the Ellipse or Filled Ellipse tool and holding the Shift key as you drag. Using the Shift key with the Line tool enables you to draw straight lines (vertical, horizontal, or 45-degree angles). <HR></BLOCKQUOTE><H3><A NAME="Heading5"></A>Zooming</H3><P>The Image Editor enables you to zoom in so that you can work on your bitmaps upclose and personal. You can zoom either by using the Zoom tool or via the View menu.To zoom in on a particular part of your image using the Zoom tool, first select theZoom tool from the Tools palette and then drag a bounding rectangle around the portionof the image you want to magnify. The magnification will change depending on thesize of the rectangle you created when you dragged. You can now see well enough tochange fine details in your bitmap.</P><P>To zoom using the menu, choose View|Zoom In or press Ctrl+I. When you choose ZoomIn from the menu, the image is magnified by a predetermined amount. To zoom out againusing the menu, choose View|Zoom Out (Ctrl+U) or View|Actual Size (Ctrl+Q).</P><P>When you are creating a cursor or an icon, the Image Editor shows a split view.Figure 11.2 shows an Image Editor window while creating an icon.</P><P><A HREF="javascript:popUp('28671102.gif')"><B>FIGURE 11.2.</B></A><B> </B><I>Editingan icon.</I></P><P>Although you can zoom either side of the split window, you will usually work witha zoomed-in copy on the left side and an actual-size image on the right, as shownin Figure 11.2.</P><P><H3><A NAME="Heading6"></A>The Line Width Palette</H3><P>The Line Width palette is displayed directly below the Tools palette. Dependingon the currently selected tool, the Line Width palette might show line widths orbrush shapes that you can choose. To pick a line width, click one of the five widthsdisplayed. Subsequent drawing operations will use the new line width until you changeit. Similarly, to change a brush shape, just click the brush shape you want to use.If you refer to Figure 11.1, you will see the Line Width palette showing brush shapes.</P><P><H3><A NAME="Heading7"></A>Working with Bitmap Files</H3><P>You can create a bitmap from scratch or load an existing bitmap and modify it.To open an existing bitmap file, choose File|Open from the main menu (bitmap fileshave a BMP extension). To create a new bitmap file, choose File|New from the mainmenu and then choose Bitmap File from the pop-up menu. The Bitmap Properties dialogbox is displayed, as shown in Figure 11.3.</P><P><A HREF="javascript:popUp('28671103.gif')"><B>FIGURE 11.3.</B></A><B> </B><I>TheBitmap Properties dialog box.</I></P><P>Here you can set the initial size of the bitmap (in pixels) as well as the colordepth. You can create a 2-color, 16-color, or 256-color bitmap.</P><BLOCKQUOTE> <P><HR><strong>NOTE:</strong> The Image Editor does not support bitmaps of more than 256 colors.<HR></BLOCKQUOTE><P>Select the size and color depth you want and click OK. A blank bitmap is displayedin an editor window. Do any drawing you want on the bitmap. When you are finishedediting, choose File|Save or File|Save As to save the bitmap file to disk.</P><P>Any time you are working with a bitmap file, the Image Editor main menu has amenu item called Bitmap. This menu has a single item under it called Image Properties.Choosing Bitmap|Image Properties displays the Bitmap Properties dialog box just aswhen you create a new bitmap file. The Bitmap Properties dialog box enables you tochange the size and color depth of the bitmap. Select a new width, height, or colordepth and click OK.</P><BLOCKQUOTE> <P><HR><strong>NOTE:</strong> There is one difference in the Bitmap Properties dialog box when it is displayed for an existing bitmap as opposed to when you're creating a new bitmap. When displayed for an existing bitmap, the Bitmap Properties dialog box has a check box labeled Stretch. This is used by the Image Editor when changing the bitmap size. If the Stretch option is off, the bitmap will not be stretched (either larger or smaller) when the bitmap size is changed. If the Stretch option is on, the bitmap will be stretched to fill the new bitmap size. Stretching a bitmap is an inexact science, so sometimes the results of stretching are less than perfect. <HR></BLOCKQUOTE><P>All in all, there isn't much to working with bitmap files. Although the ImageEditor is fine for simple bitmaps, you will probably not find it adequate for sophisticatedgraphics. If you need high-quality bitmaps, you might consider purchasing a full-featuredimage-editing package or hiring a computer artist to create your bitmaps.</P><BLOCKQUOTE> <P><HR><strong>TIP:</strong> Don't forget to check online sources for computer-graphic artists. These people know their craft far better than all but the most gifted programmers and are often very reasonable in their pricing. Repeat this 10 times: "I am a programmer, not an artist." (Okay, maybe some of you are doubly blessed.) <HR></BLOCKQUOTE><H3><A NAME="Heading8"></A>Working with Icons</H3><P>Creating icons is also an art form, but icons are not quite as demanding as full-colorbitmaps. Most of the time you can create your own icons, but great-looking iconsstill require skill. If you flip back to Figure 11.2, you will see an icon as itis displayed in the Image Editor while editing.</P><BLOCKQUOTE> <P><HR><strong>TIP:</strong> Load icon files from any source you can find and zoom in on them to get tips on how the best-looking icons are created. Creating 3D icons takes practice (and is something I never get quite right).<HR></BLOCKQUOTE><P>An icon in 32-bit Windows is actually two icons in one. The large icon is 32¥32pixels. The large icon can be placed on a dialog box such as an About box. It isalso the icon that Windows uses when creating a shortcut to your application. Inaddition, the large icon is used by Windows Explorer when the file list view is setto display large icons.</P><P>The small icon is 16¥16 pixels and is the icon used by Windows on the titlebar of your application, on the Windows taskbar, in the File Open dialog box, andin Windows Explorer when the view is set to small icons. Both the large and the smallicons are stored in the same icon file (.ico).</P><P><BLOCKQUOTE> <P><HR><strong>NOTE:</strong> You don't have to supply both a large icon and a small icon. If you supply only the large icon, Windows will shrink the large icon when it needs to display a small icon. Sometimes, however, the results are not quite what you expect and might not be good enough quality for your tastes. In those cases, you can also create the small icon so that you are in control of how your application looks, rather than rely on Windows to do the right thing. <BR> Creating a New Icon Resource<HR></P></BLOCKQUOTE><P>To create a new icon resource, choose File|New from the main menu and then chooseIcon from the pop-up menu. When you create a new icon in the Image Editor, you seethe Icon Properties dialog box, as shown in Figure 11.4.</P><P><A HREF="javascript:popUp('28671104.gif')"><B>FIGURE 11.4.</B></A><B> </B><I>TheIcon Properties dialog box.</I></P><P>This dialog box enables you to choose the icon you are creating (either the largeor the small icon) and the number of colors to use for the icon. The default is tocreate the standard icon (the large icon) and to use 16 colors. (In reality, 2-coloricons are rarely used. When was the last time you saw one?)</P><BLOCKQUOTE> <P><HR><strong>NOTE:</strong> Even if you are creating both the large icon and the small icon, you must choose one or the other to start with. For example, if you are creating a new icon, you should start with the large icon. After creating the large icon, you can then create the small icon.<HR></BLOCKQUOTE><P>When you are editing an icon, the Image Editor menu bar has an item called Icon.The Icon menu has items called New, Delete, and Test. The New menu item enables youto create a new large or small icon. For example, if you had already created thelarge icon, you could choose Icon|New from the main menu to create the small icon.</P><BLOCKQUOTE> <P><HR><strong>TIP:</strong> The Icon Editor window has a button called New that also creates a new icon and is faster than using the main menu (refer to Figure 11.2).<HR></BLOCKQUOTE><P>When you choose New to create a second icon, the Icon Properties dialog box isdisplayed just as before. If you have already created the large icon, the small iconwill be selected by default and all you have to do is click OK. The editor windowwill change to display the new, blank icon. The Image Editor will not let you createan icon that already exists in the icon file.</P><BLOCKQUOTE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -